From 9d47a05a2190f4d50b36aa792d6815ea201642d7 Mon Sep 17 00:00:00 2001 From: "A.L." Date: Thu, 28 Nov 2024 15:16:34 +0800 Subject: [PATCH] ci: add coverage step --- .github/workflows/ci.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dcc449d..493408e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -68,3 +68,22 @@ jobs: - run: forge snapshot --check env: FOUNDRY_PROFILE: default + + coverage: + needs: [test-unit] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + + - uses: foundry-rs/foundry-toolchain@v1 + with: + version: nightly + + - run: forge coverage --report lcov + + - uses: codecov/codecov-action@v3 + with: + fail_ci_if_error: true + files: ./lcov.info