Add yarn matrix (#270)

This commit is contained in:
Jaco Greeff 2020-03-16 15:31:53 +01:00 committed by GitHub
parent 5cf4a5e1c0
commit 7a2ebd310a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 34 deletions

View File

@ -2,41 +2,18 @@ name: PR
on: [pull_request]
jobs:
lint:
name: Linting
pr:
strategy:
matrix:
step: ['lint', 'test', 'build']
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.test }}
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
yarn ${{ matrix.test }}

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_PAT: ${{ secrets.GH_PAT }}
@ -25,7 +28,7 @@ jobs:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
yarn install --immutable | grep -v 'YN0013'
yarn polkadot-ci-ghact-build
yarn ${{ matrix.step }}
dummy:
name: Dummy

View File

@ -17,6 +17,7 @@
},
"scripts": {
"build": "NODE_ENV=production polkadot-dev-build-ts",
"build:release": "polkadot-ci-ghact-build",
"build:zip": "(rm -rf ./master-build.zip && yarn build && cd packages/extension/build && zip -r -FS ../../../master-build.zip . -i *) && (rm -rf ./master-src.zip && zip -r -x '*build*' -x '*node_modules*' -FS ./master-src.zip packages .babelrc.js .editorconfig .eslintignore .eslintrc.js babel.config.js CHANGELOG.md CONTRIBUTING.md jest.config.js lerna.json LICENSE package.json README.md tsconfig.json yarn.lock)",
"lint": "polkadot-dev-run-lint",
"clean": "polkadot-dev-clean-build",