actions

solidity-coverage.yml

Base Usage

coverage:
  uses: init4tech/actions/.github/workflows/solidity-coverage.yml@main

Description

This workflow checks code coverage for Solidity contracts using Foundry’s coverage tools. It generates a coverage report and compares it against a committed .coverage-report file to ensure coverage doesn’t regress.

The workflow:

Required Files

The repository must have a .coverage-report file committed that contains the expected coverage report. This file is used as a baseline for comparison.

Environment Variables

The workflow uses FOUNDRY_PROFILE: ci for the coverage generation.

Notes