Skip to content

Commit

Permalink
Optimize scenario CI run (compound-finance#578)
Browse files Browse the repository at this point in the history
This PR decreases the run time of our CI runs from ~30min to ~5-10min by splitting up the single scenario job into separate jobs per base. This also means that flaky scenarios for a single base can be retried individually without having to re-run scenarios for all other bases. I also removed some jobs that look redundant.

This change does mean that each base will now have their own scenario report, but that's not a big deal because they can all still be accessed pretty easily ([example run](https://github.com/compound-finance/comet/pull/578/checks?check_run_id=8488711261)).
  • Loading branch information
kevincheng96 authored Sep 22, 2022
1 parent b5aa739 commit 7ce1fba
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 38 deletions.
15 changes: 9 additions & 6 deletions .github/workflows/run-scenarios.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ on:
pull_request:
jobs:
run-scenarios:
strategy:
matrix:
bases: [ development, mainnet, goerli, fuji ]
name: Run scenarios
env:
ETHERSCAN_KEY: ${{ secrets.ETHERSCAN_KEY }}
Expand Down Expand Up @@ -43,16 +46,16 @@ jobs:
run: npx hardhat compile

- name: Run scenarios
run: yarn scenario
run: yarn scenario --bases ${{ matrix.bases }}

- uses: actions/upload-artifact@v2 # upload scenario results
if: success() || failure() # run this step even if previous step failed
- uses: actions/upload-artifact@v2 # upload scenario results
if: success() || failure() # run this step even if previous step failed
with:
name: scenario-results
path: scenario-results.json

- uses: dorny/test-reporter@v1
with:
name: Scenario Tests # Name of the check run which will be created
path: 'scenario-results.json' # Path to test results (inside artifact .zip)
reporter: mocha-json # Format of test results
name: Scenario Tests (${{ matrix.bases }}) # Name of the check run which will be created
path: scenario-results.json # Path to test results (inside artifact .zip)
reporter: mocha-json # Format of test results
16 changes: 0 additions & 16 deletions .github/workflows/scenario-report.yaml

This file was deleted.

16 changes: 0 additions & 16 deletions .github/workflows/unit-test-report.yaml

This file was deleted.

0 comments on commit 7ce1fba

Please sign in to comment.