Skip to content

commit new reports

commit new reports #55

Workflow file for this run

name: CI
on:
push:
pull_request:
workflow_dispatch:
env:
FOUNDRY_PROFILE: ci
jobs:
check:
strategy:
fail-fast: true
matrix:
include:
- env:
FOUNDRY_PROFILE: "via-ir"
- env:
FOUNDRY_PROFILE: "no-ir"
name: Foundry project
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly
- name: Show Forge version
run: |
forge --version
- name: Run Forge fmt
run: |
forge fmt --check
id: fmt
- name: Run Forge build
run: |
forge build --sizes
id: build
# This `forge snapshot` command is only used for CBORDecoder comparison.
# https://book.getfoundry.sh/forge/gas-section-snapshots
- name: Confirm comparison snapshot
run: |
forge snapshot --check ${FOUNDRY_PROFILE}.gas-snapshot \
--match-path "test/comparison/*"
id: comparison-snapshot
- name: Run remaining Forge tests, confirm section snapshots
run: |
forge test -vvv \
--no-match-path "test/comparison/*"
git diff --exit-code snapshots-${FOUNDRY_PROFILE}
id: test
# Coverage testing affects gas cost, and creates different snapshots.
# Only `lcov.info` is diffed to confirm coverage is checked in. Coverage
# doesn't use the 'comparison' tests.
- name: Confirm coverage
run: |
forge coverage --report-file ${FOUNDRY_PROFILE}.lcov.info \
--report lcov --report summary \
--no-match-path "test/comparison/*" \
--no-match-coverage "test/comparison/*"
git diff --exit-code ${FOUNDRY_PROFILE}.lcov.info
id: diff-coverage