From c68a11f7157e67446c4da0cdc737db153d27cd9a Mon Sep 17 00:00:00 2001 From: Justin Starry Date: Wed, 24 Nov 2021 09:15:43 -0500 Subject: [PATCH] ci: move web3 commit lint to parallel check (#21414) --- .github/workflows/web3.yml | 32 ++++++++++++++++++++++++++------ .mergify.yml | 4 +++- 2 files changed, 29 insertions(+), 7 deletions(-) diff --git a/.github/workflows/web3.yml b/.github/workflows/web3.yml index 9776cd10e..d50a193d6 100644 --- a/.github/workflows/web3.yml +++ b/.github/workflows/web3.yml @@ -19,18 +19,16 @@ jobs: steps: - run: echo "Done" - check-web3: + web3-commit-lint: runs-on: ubuntu-latest + # Set to true in order to avoid cancelling other workflow jobs. + # Mergify will still require web3-commit-lint for automerge + continue-on-error: true defaults: run: working-directory: web3.js - strategy: - matrix: - node: [ '12', '14', '16' ] - - name: Node ${{ matrix.node }} steps: - uses: actions/checkout@v2 with: @@ -48,6 +46,28 @@ jobs: run: bash commitlint.sh env: COMMIT_RANGE: ${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }} + + check-web3: + runs-on: ubuntu-latest + + defaults: + run: + working-directory: web3.js + + strategy: + matrix: + node: [ '12', '14', '16' ] + + name: Node ${{ matrix.node }} + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 + with: + node-version: ${{ matrix.node }} + cache: 'npm' + cache-dependency-path: web3.js/package-lock.json + - run: npm i -g npm@7 + - run: npm ci - run: npm run lint - run: | npm run build diff --git a/.mergify.yml b/.mergify.yml index bb6c81122..382b69885 100644 --- a/.mergify.yml +++ b/.mergify.yml @@ -40,8 +40,10 @@ pull_request_rules: - status-success=check-explorer - -files~=^explorer/ - or: + - and: + - status-success=all-web3-checks + - status-success=web3-commit-lint # only require web3 checks if web3.js files changed - - status-success=all-web3-checks - -files~=^web3.js/ actions: merge: