Add yarn matrix (#70)

This commit is contained in:
Jaco Greeff
2020-03-16 15:31:06 +01:00
committed by GitHub
parent b56924a5b3
commit 3ef1b2073f
6 changed files with 26 additions and 36 deletions

View File

@@ -2,43 +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.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: |
rustup toolchain install nightly
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: |
rustup toolchain install nightly
yarn install --immutable | grep -v 'YN0013'
yarn build
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:
@@ -23,9 +26,8 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
rustup toolchain install nightly
yarn install --immutable | grep -v 'YN0013'
yarn polkadot-ci-ghact-build
yarn ${{ matrix.step }}
dummy:
name: Dummy

View File

@@ -12,6 +12,7 @@
},
"scripts": {
"build": "./scripts/build.sh",
"build:release": "./scripts/build-release.sh",
"lint": "polkadot-dev-run-lint",
"clean": "./scripts/clean.sh",
"postinstall": "polkadot-dev-yarn-only",

9
scripts/build-release.sh Executable file
View File

@@ -0,0 +1,9 @@
#!/usr/bin/env bash
# Copyright 2019-2020 @polkadot/wasm authors & contributors
# This software may be modified and distributed under the terms
# of the Apache-2.0 license. See the LICENSE file for details.
set -e
rustup toolchain install nightly
yarn polkadot-ci-ghact-build

View File

@@ -5,6 +5,7 @@
set -e
rustup toolchain install nightly
./scripts/install-build-deps.sh
echo "*** Building packages"

View File

@@ -5,6 +5,8 @@
set -e
rustup toolchain install nightly
cd packages
PACKAGES=( $(ls -1d *) )