Skip to content

test: add more gas snapshots for relevant contracts (#92) #233

test: add more gas snapshots for relevant contracts (#92)

test: add more gas snapshots for relevant contracts (#92) #233

Workflow file for this run

name: Test
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
on:
pull_request:
push:
branches:
- main
jobs:
lint:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6
with:
node-version-file: .nvmrc
cache: "npm"
- name: install
run: npm ci --prefer-offline --no-audit
- name: lint
run: npm run lint
test:
name: Foundry build n test
runs-on: ubuntu-latest
env:
FOUNDRY_PROFILE: ci
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6
with:
node-version-file: .nvmrc
cache: "npm"
- name: Install node dependencies
run: npm ci --prefer-offline --no-audit
- name: Run Foundry setup
uses: bgd-labs/github-workflows/.github/actions/foundry-setup@d738561b5afce35ca3752b28236c9dd68a3fa822
- name: Run Forge tests
uses: bgd-labs/github-workflows/.github/actions/foundry-test@d738561b5afce35ca3752b28236c9dd68a3fa822
- name: Run Gas report
uses: bgd-labs/github-workflows/.github/actions/foundry-gas-report@d738561b5afce35ca3752b28236c9dd68a3fa822
- name: Cleanup
# This test will currently fail on coverage due to the gas limit beaing breached with optimizer disabled
run: rm tests/deployments/DeploymentsGasLimits.t.sol
- name: Run Lcov report
uses: bgd-labs/github-workflows/.github/actions/foundry-lcov-report@d738561b5afce35ca3752b28236c9dd68a3fa822
- name: Save PR number
if: github.event_name == 'pull_request' || github.event_name == 'pull_request_target'
env:
PR_NUMBER: ${{ github.event.number }}
run: |
mkdir -p ./pr
echo $PR_NUMBER > /tmp/content/pr_number.txt
- uses: actions/upload-artifact@v4
with:
name: content
path: /tmp/content
# we let failing tests pass so we can log them in the comment, still we want the ci to fail
- name: Post test
if: ${{ env.testStatus != 0 }}
run: |
echo "tests failed"
exit 1