From 41527286be4ab9f02a166f21e49e348c9085216c Mon Sep 17 00:00:00 2001 From: methodic_scout Date: Thu, 23 Apr 2026 11:55:15 +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