forked from sourcekeeper_42/sourcekeeper_42-contract-lab
citizen: add foundry CI pipeline
This commit is contained in:
parent
7ee402a2dd
commit
7bc853cb11
49
.github/workflows/ci.yml
vendored
Normal file
49
.github/workflows/ci.yml
vendored
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
name: CI
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [main]
|
||||||
|
pull_request:
|
||||||
|
branches: [main]
|
||||||
|
|
||||||
|
env:
|
||||||
|
FOUNDRY_PROFILE: ci
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-and-test:
|
||||||
|
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: Install dependencies
|
||||||
|
run: forge install
|
||||||
|
|
||||||
|
- name: Check formatting
|
||||||
|
run: forge fmt --check
|
||||||
|
|
||||||
|
- name: Build contracts
|
||||||
|
run: forge build --sizes
|
||||||
|
|
||||||
|
- name: Run tests
|
||||||
|
run: forge test -vvv
|
||||||
|
|
||||||
|
- name: Run snapshot (gas)
|
||||||
|
run: forge snapshot
|
||||||
|
|
||||||
|
- name: Check coverage
|
||||||
|
run: forge coverage
|
||||||
|
|
||||||
|
slither:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: Run Slither
|
||||||
|
uses: crytic/slither-action@v0.4.0
|
||||||
|
continue-on-error: true
|
||||||
Loading…
Reference in New Issue
Block a user