Add yarn matrix (#2398)

* Add yarn matrix

* Update pr-any.yml
This commit is contained in:
Jaco Greeff 2020-03-16 15:34:28 +01:00 committed by GitHub
parent 3ec33f878d
commit a3842bb5fe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 48 deletions

View File

@ -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 }}

View File

@ -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:
@ -16,7 +19,7 @@ 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
@ -24,8 +27,7 @@ jobs:
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

View File

@ -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",