Skip to content

Foundry

Foundry #6

Workflow file for this run

name: Foundry
on:
workflow_dispatch:
push:
branches: [main, develop, feat_unit_tests_full_coverage]
pull_request:
branches: [main, develop]
env:
FOUNDRY_PROFILE: ci
defaults:
run:
working-directory: foundry
jobs:
test-and-coverage:
name: Run tests and generate coverage
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Install Foundry
uses: foundry-rs/[email protected]
- name: Run Forge tests and generate LCOV coverage report
run: |
forge test -vvv
forge coverage --report lcov
id: test
- name: Upload coverage report
uses: actions/upload-artifact@v2
with:
name: lcov-report
path: foundry/lcov.info
coverage_report:
name: Enforce 100% coverage
needs: test-and-coverage
runs-on: ubuntu-latest
steps:
- name: Download coverage report
uses: actions/download-artifact@v2
with:
name: lcov-report
path: coverage
- name: Setup LCOV
uses: hrishikesh-kadam/setup-lcov@v1
- name: Report code coverage and check threshold
uses: zgosalvez/[email protected]
with:
coverage-files: 'coverage/lcov.info'
minimum-coverage: 100
update-comment: false
id: coverage