feat: rust bytecode crate (#44) #26
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: Foundry CI | |
on: | |
pull_request: | |
branches: [main] | |
push: | |
branches: [main] | |
workflow_dispatch: | |
concurrency: | |
group: forge-validation-${{ github.head_ref }} | |
cancel-in-progress: true | |
env: | |
FOUNDRY_PROFILE: ci | |
jobs: | |
foundry-check: | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
fail-fast: true | |
name: Foundry project | |
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 Solidity Dependencies | |
run: forge soldeer update -d | |
- name: Run Forge build | |
run: | | |
forge --version | |
forge build --sizes --color always | |
id: build | |
- name: Run Forge tests | |
run: | | |
forge test -vvv --color always | |
id: test | |
coverage_report: | |
name: Generate coverage report | |
needs: foundry-check | |
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 Solidity Dependencies | |
run: forge soldeer update -d | |
- name: Setup LCOV | |
uses: hrishikesh-kadam/setup-lcov@v1 | |
- name: Run Forge Coverage | |
run: forge coverage --color always --report lcov | |
id: coverage | |
- name: Report code coverage | |
uses: zgosalvez/github-actions-report-lcov@v3 | |
with: | |
coverage-files: lcov.info | |
minimum-coverage: 85 | |
artifact-name: code-coverage-report | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
update-comment: true |