Skip to content

Commit

Permalink
Update workflow to publish ABI on PRs
Browse files Browse the repository at this point in the history
  • Loading branch information
aviggiano committed Jul 5, 2024
1 parent 043b734 commit 0597b2a
Showing 1 changed file with 36 additions and 18 deletions.
54 changes: 36 additions & 18 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -124,13 +124,12 @@ jobs:
./script/prepare_crytic.sh
./echidna . --contract CryticTester --config echidna.yaml --test-mode ${{ matrix.mode }} --corpus-dir corpus --test-limit 10000
abi-coverage:
abi:
strategy:
fail-fast: true

name: ABI/Coverage
name: ABI
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v3
with:
Expand All @@ -144,35 +143,54 @@ jobs:
- name: Install dependencies
run: npm install

- name: Setup git config
run: |
git config --local user.email "[email protected]"
git config --local user.name "Size"
- name: Coverage
run: |
./script/update_readme_coverage.sh
git add README.md
git commit -m "Update coverage [skip ci]" || true
- name: ABI
run: |
forge build --build-info
- name: Archive production artifacts
- name: Archive ABI
uses: actions/upload-artifact@v4
with:
name: abi
path: |
out/Size.sol/Size.json
out/PriceFeed.sol/PriceFeed.json
out/VariablePoolBorrowRateFeed.sol/VariablePoolBorrowRateFeed.json
out/PoolMock.sol/PoolMock.json
out/IPriceFeed.sol/IPriceFeed.json
out/IPool.sol/IPool.json
out/WETH.sol/WETH.json
out/USDC.sol/USDC.json
out/Errors.sol/Errors.json
out/Events.sol/Events.json
coverage:
strategy:
fail-fast: true

name: Coverage
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v3
with:
submodules: recursive

- name: Setup Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly

- name: Install dependencies
run: npm install

- name: Setup git config
run: |
git config --local user.email "[email protected]"
git config --local user.name "Size"
- name: Coverage
run: |
./script/update_readme_coverage.sh
git add README.md
git commit -m "Update coverage [skip ci]" || true
- name: Push
run: |
git push https://${{ env.token }}@github.com/${{ github.event.repository.full_name }}.git
Expand Down

0 comments on commit 0597b2a

Please sign in to comment.