Create funding.json #24
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
name: test | |
on: | |
pull_request: | |
branches: | |
- "main" | |
push: | |
branches: | |
- "main" | |
env: | |
FOUNDRY_PROFILE: ci | |
jobs: | |
forge-test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
- name: Restore cached node_modules | |
id: cache-node-modules | |
uses: actions/cache@v2 | |
with: | |
path: | | |
./node_modules | |
./packages/node_modules | |
key: ${{ runner.os }}-${{ steps.nvm.outputs.NVMRC }}-nodemodules-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-${{ steps.nvm.outputs.NVMRC }}-nodemodules- | |
- name: Install Foundry | |
uses: onbjerg/foundry-toolchain@v1 | |
with: | |
version: nightly | |
- name: Install JS dependencies | |
if: steps.cache-node-modules.outputs.cache-hit != 'true' | |
run: npm install --frozen-lockfile --prefer-offline | |
- name: Check contract sizes | |
run: forge build --sizes | |
- name: Run tests | |
env: | |
MAINNET_RPC_URL: ${{ secrets.MAINNET_RPC_URL }} | |
run: forge test --force --optimize -vvv --gas-price 1000 | |
- name: Check gas snapshots | |
env: | |
MAINNET_RPC_URL: ${{ secrets.MAINNET_RPC_URL }} | |
run: forge snapshot --check |