Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: ci #12

Merged
merged 2 commits into from
Apr 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 39 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,47 @@
name: CI
name: Solidity Base CI

on:
pull_request:
push:
branches:
- main
workflow_dispatch:

env:
FOUNDRY_PROFILE: ci

jobs:
solidity-base:
uses: init4tech/actions/.github/workflows/solidity-base.yml@main
with:
gas-diff-tolerance: 2 # setting the gas diff tolerance to 2%
solidity-coverage:
uses: init4tech/actions/.github/workflows/solidity-coverage.yml@main
check:
strategy:
fail-fast: true

name: Solidity Base CI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1

- name: Run Forge build
run: |
forge --version
forge build --sizes
id: build

- name: Run Forge fmt
run: |
forge fmt --check
id: fmt

- name: Run Forge tests
run: |
forge test -vvv
id: test
# do not run if disable-gas-snapshot is true
- name: Compare gas reports
run: |
FOUNDRY_PROFILE=snapshot forge snapshot --check --silent --tolerance ${{ inputs.gas-diff-tolerance }}
id: gas-snapshot