Skip to content

Commit

Permalink
Proper parallel coveralls job
Browse files Browse the repository at this point in the history
  • Loading branch information
mmv08 committed Nov 9, 2023
1 parent baf50a4 commit cd56c18
Showing 1 changed file with 34 additions and 20 deletions.
54 changes: 34 additions & 20 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,28 +28,28 @@ jobs:
- run: npm run lint:ts:prettier
- run: npm run lint:ts

tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: ${{ env.NODE_VERSION }}
cache: "npm"
- run: npm ci
- run: npm run build
- run: SAFE_CONTRACT_UNDER_TEST=SafeL2 npm run coverage
- name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
# tests:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v2
# - uses: actions/setup-node@v2
# with:
# node-version: ${{ env.NODE_VERSION }}
# cache: "npm"
# - run: npm ci
# - run: npm run build
# - run: SAFE_CONTRACT_UNDER_TEST=SafeL2 npm run coverage
# - name: Coveralls
# uses: coverallsapp/github-action@master
# with:
# github-token: ${{ secrets.GITHUB_TOKEN }}

tests-other:
tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
contract-name: ["SafeL2"]
contract-name: ["Safe", "SafeL2"]
env:
SAFE_CONTRACT_UNDER_TEST: ${{ matrix.contract-name }}
steps:
Expand All @@ -60,11 +60,25 @@ jobs:
cache: "npm"
- run: npm ci
- run: npm run build
- run: npm run coverage
- name: Coveralls
uses: coverallsapp/github-action@master
- run: SAFE_CONTRACT_UNDER_TEST=$ npm run coverage
- name: Send coverage to Coveralls (parallel)
uses: coverallsapp/github-action@v2
with:
parallel: true
flag-name: run-${{ join(matrix.*, '-') }}
github-token: ${{ secrets.GITHUB_TOKEN }}

finish:
runs-on: ubuntu-latest
needs: tests
if: ${{ always() }}
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@v2
with:
parallel-finished: true
carryforward: "run-Safe,run-SafeL2"

benchmarks:
runs-on: ubuntu-latest
strategy:
Expand Down

0 comments on commit cd56c18

Please sign in to comment.