Skip to content

Commit

Permalink
Add yarn matrix (#2398)
Browse files Browse the repository at this point in the history
* Add yarn matrix

* Update pr-any.yml
  • Loading branch information
jacogr authored Mar 16, 2020
1 parent 3ec33f8 commit a3842bb
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 48 deletions.
50 changes: 7 additions & 43 deletions .github/workflows/pr-any.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,54 +2,18 @@ name: PR
on: [pull_request]

jobs:
lint:
name: Linting
pr:
strategy:
matrix:
step: ['lint', 'test', 'build:code', 'build:i18n']
name: ${{ matrix.step }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: '12.x'
- name: lint
- name: ${{ matrix.step }}
run: |
yarn install --immutable | grep -v 'YN0013'
yarn lint
test:
name: Testing
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: '12.x'
- name: test
run: |
yarn install --immutable | grep -v 'YN0013'
yarn test
build_code:
name: Build Code
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: '12.x'
- name: build
run: |
yarn install --immutable | grep -v 'YN0013'
yarn build:code
build_i18n:
name: Build i18n
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: '12.x'
- name: build
run: |
yarn install --immutable | grep -v 'YN0013'
yarn build:i18n
yarn ${{ matrix.step }}
12 changes: 7 additions & 5 deletions .github/workflows/push-master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,11 @@ on:
- master

jobs:
build_code:
name: Build Code
master:
strategy:
matrix:
step: ['build:release']
name: ${{ matrix.step }}
if: "! contains(github.event.head_commit.message, '[CI Skip]')"
runs-on: ubuntu-latest
steps:
Expand All @@ -16,16 +19,15 @@ jobs:
- uses: actions/setup-node@v1
with:
node-version: '12.x'
- name: build
- name: ${{ matrix.step }}
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
GH_PAGES_SRC: packages/apps/build
GH_PAT: ${{ secrets.GH_PAT }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
yarn install --immutable | grep -v 'YN0013'
yarn polkadot-ci-ghact-build
yarn polkadot-ci-ghact-docs
yarn ${{ matrix.step }}
dummy:
name: Dummy
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"build": "yarn run build:i18n && yarn run build:code",
"build:code": "NODE_ENV=production node_modules/@polkadot/dev/scripts/polkadot-dev-build-ts.js",
"build:i18n": "i18next-scanner --config i18next-scanner.config.js",
"build:release": "yarn polkadot-ci-ghact-build && yarn polkadot-ci-ghact-docs",
"build:www": "rm -rf packages/apps/build && mkdir -p packages/apps/build && yarn run build:i18n && cd packages/apps && NODE_ENV=production webpack --config webpack.config.js",
"docs": "echo \"skipping docs\"",
"clean": "polkadot-dev-clean-build",
Expand Down

0 comments on commit a3842bb

Please sign in to comment.