Skip to content
This repository has been archived by the owner on Jul 30, 2023. It is now read-only.

Commit

Permalink
Migrate to rush (#26)
Browse files Browse the repository at this point in the history
Use Rush to manage the repo
  • Loading branch information
ertrzyiks authored Apr 4, 2021
1 parent 5bd3709 commit e16ef38
Show file tree
Hide file tree
Showing 265 changed files with 31,555 additions and 27,499 deletions.
2 changes: 1 addition & 1 deletion .dokku-monorepo
Original file line number Diff line number Diff line change
@@ -1 +1 @@
yummy-api=packages/cms
yummy-api=apps/cms
14 changes: 14 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Don't allow people to merge changes to these generated files, because the result
# may be invalid. You need to run "rush update" again.
pnpm-lock.yaml merge=binary
shrinkwrap.yaml merge=binary
npm-shrinkwrap.json merge=binary
yarn.lock merge=binary

# Rush's JSON config files use JavaScript-style code comments. The rule below prevents pedantic
# syntax highlighters such as GitHub's from highlighting these comments as errors. Your text editor
# may also require a special configuration to allow comments in JSON.
#
# For more information, see this issue: https://github.com/microsoft/rushstack/issues/1088
#
*.json linguist-language=JSON-with-Comments
24 changes: 10 additions & 14 deletions .github/workflows/blog_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,22 @@ name: Blog deploy
on: [repository_dispatch, workflow_dispatch]

jobs:
build:
build-blog:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: '12.x'
- name: Get yarn cache
id: yarn-cache
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v1
node-version: '14.x'
- name: Cache .pnpm-store
uses: actions/cache@v1
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- run: yarn install --frozen-lockfile
path: ~/.pnpm-store
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
- run: node common/scripts/install-run-rush.js install
- name: Build project
run: for i in {1..3}; do yarn lerna run --scope @yummy/blog build && break; done
run: for i in {1..3}; do node common/scripts/install-run-rush.js build --to blog && break; done
env:
NODE_OPTIONS: --max_old_space_size=4096
API_URL: https://api.kuchnia-yummy.pl
Expand All @@ -33,9 +29,9 @@ jobs:
name: public
path: packages/blog/public/

deploy:
deploy-blog:
runs-on: ubuntu-latest
needs: build
needs: build-blog
steps:
- uses: actions/download-artifact@v2
with:
Expand Down
71 changes: 28 additions & 43 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,55 +3,45 @@ name: CI
on: [push]

jobs:
build:
test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: '12.x'
- name: Get yarn cache
id: yarn-cache
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v1
node-version: '14.x'

- name: Cache .pnpm-store
uses: actions/cache@v1
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- run: yarn install --frozen-lockfile
- run: yarn lerna run --stream lint
- name: Run tests
run: yarn lerna run --stream test
env:
CI: true
path: ~/.pnpm-store
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}

- run: node common/scripts/install-run-rush.js install
- run: node common/scripts/install-run-rush.js test

e2e:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: '12.x'
- name: Get yarn cache
id: yarn-cache
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v1
node-version: '14.x'
- name: Cache .pnpm-store
uses: actions/cache@v1
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- run: yarn install --frozen-lockfile
- name: Run e2e tests
run: yarn test:e2e:ci
path: ~/.pnpm-store
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
- run: node common/scripts/install-run-rush.js install
- run: node common/scripts/install-run-rush.js test:e2e:ci --only e2e -v
- name: Upload cypress screenshots
uses: actions/upload-artifact@v1
if: failure()
with:
name: cypress
path: packages/blog/cypress/screenshots
path: apps/blog/cypress/screenshots

visual:
runs-on: ubuntu-latest
Expand All @@ -60,29 +50,24 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: '12.x'
- name: Get yarn cache
id: yarn-cache
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v1
node-version: '14.x'
- name: Cache .pnpm-store
uses: actions/cache@v1
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- run: yarn install --frozen-lockfile
- name: Run visual tests
run: yarn test:visual
path: ~/.pnpm-store
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
- run: node common/scripts/install-run-rush.js install
- run: node common/scripts/install-run-rush.js test:visual --only e2e -v
- name: Upload visual comparison results
uses: actions/upload-artifact@v1
if: failure()
with:
name: visual
path: packages/blog/puppeteer/screenshots
path: apps/blog/puppeteer/screenshots

deploy:
runs-on: ubuntu-latest
needs: [build, visual, e2e]
needs: [test, visual, e2e]
if: github.ref == 'refs/heads/master'
steps:
- name: Repository Dispatch
Expand Down
145 changes: 68 additions & 77 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,77 +1,68 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# Typescript v1 declaration files
typings/

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# dotenv environment variables file
.env

# gatsby files
.cache/
packages/blog/public

# Mac files
.DS_Store

# Yarn
yarn-error.log
.pnp/
.pnp.js
# Yarn Integrity file
.yarn-integrity

.git-deploy
data.json
.idea

packages/core/cypress/videos

test-results
# Logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Runtime data
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env

# next.js build output
.next

# OS X temporary files
.DS_Store

# Rush temporary files
common/deploy/
common/temp/
common/autoinstallers/*/.npmrc
**/.rush/temp/


apps/blog/.cache
18 changes: 18 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
language: node_js
node_js:
- '8.9.4'
script:
- set -e

- echo 'Checking for missing change logs...' && echo -en 'travis_fold:start:change\\r'
- git fetch origin master:refs/remotes/origin/master -a
- node common/scripts/install-run-rush.js change -v
- echo -en 'travis_fold:end:change\\r'

- echo 'Installing...' && echo -en 'travis_fold:start:install\\r'
- node common/scripts/install-run-rush.js install
- echo -en 'travis_fold:end:install\\r'

- echo 'Building...' && echo -en 'travis_fold:start:build\\r'
- node common/scripts/install-run-rush.js rebuild --verbose
- echo -en 'travis_fold:end:build\\r'
1 change: 0 additions & 1 deletion .yarnrc

This file was deleted.

File renamed without changes.
3 changes: 3 additions & 0 deletions packages/blog/.gitignore → apps/blog/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
puppeteer/screenshots/diff
puppeteer/screenshots/current
data.json
public
test-results
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion packages/blog/cypress.json → apps/blog/cypress.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"baseUrl": "http://localhost:8001/",
"video": false,
"reporter": "../../node_modules/mocha-junit-reporter",
"reporter": "mocha-junit-reporter",
"reporterOptions": {
"mochaFile": "test-results/cypress/junit.xml"
}
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
10 changes: 10 additions & 0 deletions apps/blog/gatsby-node.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
let gatsbyNodeModules = require('fs').realpathSync('node_modules/gatsby')
gatsbyNodeModules = require('path').resolve(gatsbyNodeModules, '..')

exports.onCreateWebpackConfig = ({ stage, actions }) => {
actions.setWebpackConfig({
resolve: {
modules: [gatsbyNodeModules, 'node_modules'],
},
})
}
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion packages/blog/package.json → apps/blog/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@yummy/blog",
"name": "blog",
"version": "0.0.0",
"private": true,
"description": "> TODO: description",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions packages/cms/package.json → apps/cms/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@yummy/cms",
"name": "cms",
"private": true,
"version": "0.1.0",
"description": "A Strapi application",
Expand All @@ -26,7 +26,7 @@
"strapi-plugin-graphql": "3.4.1",
"strapi-plugin-upload": "3.4.1",
"strapi-plugin-users-permissions": "3.4.1",
"strapi-provider-upload-github": "file:./providers/strapi-provider-upload-github",
"strapi-provider-upload-github": "1.0.0",
"strapi-utils": "3.4.1",
"yaml": "^1.10.0",
"@octokit/core": "^3.2.4",
Expand Down
File renamed without changes.
Loading

0 comments on commit e16ef38

Please sign in to comment.