-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Added a ci job that checks for contract size
* Caching foundry build for different test tasks * Combined test and coverage into single workflow file
- Loading branch information
Showing
5 changed files
with
138 additions
and
109 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
name: 'Setup Node and Foundry' | ||
description: 'Setups up node and foundry' | ||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Install Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16 | ||
cache: "yarn" | ||
|
||
- name: Install project dependencies | ||
shell: bash | ||
run: yarn | ||
|
||
- name: Install Foundry | ||
uses: foundry-rs/foundry-toolchain@v1 | ||
with: | ||
version: nightly |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,119 @@ | ||
name: Foundry | ||
|
||
on: push | ||
|
||
jobs: | ||
build: | ||
name: Build and cache | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Install node deps and founry | ||
uses: ./.github/actions/setup_deps | ||
|
||
- name: Build contracts | ||
run: | | ||
forge build | ||
- name: Archive built artifacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: foundry-built-artifacts | ||
path: | | ||
cache | ||
out | ||
retention-days: 1 | ||
|
||
contract_size_check: | ||
needs: build | ||
strategy: | ||
fail-fast: true | ||
|
||
name: Contract Size Check | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Install node deps and founry | ||
uses: ./.github/actions/setup_deps | ||
|
||
- name: Download foundry artifacts | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: foundry-built-artifacts | ||
|
||
- name: Check contract sizes | ||
run: | | ||
forge build --sizes | ||
test: | ||
needs: build | ||
strategy: | ||
fail-fast: true | ||
|
||
name: Test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Install node deps and founry | ||
uses: ./.github/actions/setup_deps | ||
|
||
- name: Download foundry artifacts | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: foundry-built-artifacts | ||
|
||
- name: Run Forge tests | ||
run: | | ||
forge test -vvv | ||
test_fork: | ||
needs: build | ||
strategy: | ||
fail-fast: true | ||
|
||
name: Fork Tests | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Install node deps and founry | ||
uses: ./.github/actions/setup_deps | ||
|
||
- name: Download foundry artifacts | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: foundry-built-artifacts | ||
|
||
- name: Run fork tests | ||
run: | | ||
forge test -vvv --match-test fork | ||
env: | ||
FORK_TEST_CHAINS: mainnet,goerli,optimism,optimism_goerli,zora,zora_goerli,base_goerli,base,pgn_sepolia,pgn | ||
ALCHEMY_KEY: ${{ secrets.ALCHEMY_KEY }} | ||
|
||
storage_layout: | ||
needs: build | ||
strategy: | ||
fail-fast: true | ||
|
||
name: Inpect storage layout | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Install node deps and founry | ||
uses: ./.github/actions/setup_deps | ||
|
||
- name: Download foundry artifacts | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: foundry-built-artifacts | ||
|
||
- name: "Inspect Storage Layout" | ||
continue-on-error: false | ||
run: | | ||
forge build | ||
yarn run storage-inspect:check |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.