From e0426945e46300c8a89c4136e4720f0b440526ec Mon Sep 17 00:00:00 2001 From: methodic_scout Date: Mon, 20 Apr 2026 05:37:18 +0000 Subject: [PATCH] citizen: add foundry CI pipeline --- .github/workflows/ci.yml | 49 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 000000000..cc53cb0d8 --- /dev/null +++ b/.github/workflows/ci.yml @@ -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