-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* chore: update forge-std and fix CI * chore: update forge-std and fix CI * chore: update forge-std and fix CI * chore: update forge-std and fix CI * chore: update forge-std and fix CI * chore: update forge-std and fix CI
- Loading branch information
1 parent
94f8465
commit efcbdf2
Showing
4 changed files
with
706 additions
and
68 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 |
---|---|---|
|
@@ -5,55 +5,149 @@ on: | |
paths: | ||
- 'protocol/**' | ||
|
||
concurrency: | ||
group: ${{github.workflow}}-${{github.ref}} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
e2eTest: | ||
hardhatTests: | ||
name: Hardhat Tests | ||
runs-on: ubuntu-latest | ||
runs-on: ${{ matrix.os }} | ||
permissions: | ||
# required for all workflows | ||
security-events: write | ||
# only required for workflows in private repositories | ||
actions: read | ||
contents: read | ||
strategy: | ||
matrix: | ||
os: | ||
- ubuntu-latest | ||
node_version: | ||
- 18 | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- uses: actions/setup-node@v3 | ||
- name: Use Node.js ${{ matrix.node_version }} | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: '18.x' | ||
node-version: ${{ matrix.node_version }} | ||
cache: 'yarn' | ||
cache-dependency-path: protocol/yarn.lock | ||
|
||
- run: yarn install | ||
- name: Install yarn project | ||
run: yarn install | ||
working-directory: protocol | ||
|
||
- run: yarn compile | ||
- name: Hardhat Compile | ||
run: yarn compile | ||
working-directory: protocol | ||
|
||
- run: yarn test | ||
- name: Hardhat Test | ||
run: yarn test | ||
working-directory: protocol | ||
env: | ||
TESTS_MAINNET_RPC_URL: ${{ secrets.TESTS_MAINNET_RPC_URL }} | ||
|
||
fuzzTest: | ||
foundryTests: | ||
name: Foundry Tests | ||
runs-on: ubuntu-latest | ||
runs-on: ${{ matrix.os }} | ||
permissions: | ||
# required for all workflows | ||
security-events: write | ||
# only required for workflows in private repositories | ||
actions: read | ||
contents: read | ||
strategy: | ||
matrix: | ||
os: | ||
- ubuntu-latest | ||
node_version: | ||
- 18 | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
|
||
- uses: actions/setup-node@v3 | ||
- name: Use Node.js ${{ matrix.node_version }} | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: '18.x' | ||
node-version: ${{ matrix.node_version }} | ||
cache: 'yarn' | ||
cache-dependency-path: protocol/yarn.lock | ||
|
||
- run: yarn install | ||
- name: Install yarn project | ||
run: yarn install | ||
working-directory: protocol | ||
|
||
- name: Install Foundry | ||
uses: foundry-rs/[email protected] | ||
#with: | ||
# version: nightly-ca67d15f4abd46394b324c50e21e66f306a1162d | ||
uses: foundry-rs/foundry-toolchain@v1 | ||
with: | ||
version: nightly | ||
# version: nightly-ca67d15f4abd46394b324c50e21e66f306a1162d | ||
cache: true | ||
|
||
- run: forge --version | ||
- name: Show the Foundry CI config | ||
run: forge config | ||
env: | ||
FOUNDRY_PROFILE: ci | ||
|
||
- name: Show the Foundry version | ||
run: forge --version | ||
working-directory: protocol | ||
|
||
- name: Run tests | ||
run: FOUNDRY_PROFILE=ci forge test --gas-report | ||
- name: Foundry tests | ||
run: forge test --gas-report | ||
working-directory: protocol | ||
env: | ||
FOUNDRY_PROFILE: ci | ||
MAINNET_RPC_URL: ${{ secrets.TESTS_MAINNET_RPC_URL }} | ||
|
||
slither: | ||
name: Slither | ||
runs-on: ${{ matrix.os }} | ||
permissions: | ||
# only required for workflows in private repositories | ||
actions: read | ||
contents: read | ||
strategy: | ||
matrix: | ||
os: | ||
- ubuntu-latest | ||
node_version: | ||
- 18 | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
|
||
- name: Use Node.js ${{ matrix.node_version }} | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ matrix.node_version }} | ||
cache: 'yarn' | ||
cache-dependency-path: protocol/yarn.lock | ||
|
||
- name: Install yarn project | ||
run: yarn install | ||
working-directory: protocol | ||
|
||
- name: Install Foundry | ||
uses: foundry-rs/foundry-toolchain@v1 | ||
with: | ||
version: nightly | ||
# version: nightly-ca67d15f4abd46394b324c50e21e66f306a1162d | ||
cache: false | ||
|
||
- name: install slither | ||
run: cd protocol && pip install -r slither.requirements.txt | ||
|
||
# Can't output to SARIF for private repos without paying for Advanced Security | ||
- name: run slither | ||
run: cd protocol && yarn slither-check |
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.