create ci.yml workflow #1
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: ci | |
on: push | |
env: | |
FOUNDRY_PROFILE: ci | |
jobs: | |
setup: | |
strategy: | |
fail-fast: true | |
name: Install Dependancies | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Install Foundry | |
uses: foundry-rs/foundry-toolchain@v1 | |
with: | |
version: nightly | |
tests: | |
strategy: | |
fail-fast: true | |
needs: setup | |
name: Unit Tests | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Run unit tests | |
run: | | |
make test | |
id: test | |
coverage: | |
strategy: | |
fail-fast: true | |
needs: setup | |
name: Coverage | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Install LCOV | |
uses: hrishikesh-kadam/setup-lcov@f5da1b26b0dcf5d893077a3c4f29cf78079c841d # v1.0.0 | |
- name: Generate coverage report | |
run: | | |
make coverage-report | |
id: coverage | |
- name: Report code coverage | |
uses: zgosalvez/github-actions-report-lcov@a546f89a65a0cdcd82a92ae8d65e74d450ff3fbc # v4.1.4 | |
with: | |
# update-comment: true - TODO: supply token so coverage can be written to PR :) | |
coverage-files: lcov.info | |
minimum-coverage: 12 |