Maintenance/ci script #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: Coinroutes Dex Integration | Solidity Quality Checks | |
on: | |
push: | |
branches: ["main", "develop"] | |
pull_request: | |
branches: ["main", "develop"] | |
workflow_dispatch: | |
env: | |
FOUNDRY_PROFILE: ci | |
jobs: | |
check: | |
strategy: | |
fail-fast: true | |
name: Foundry project | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
ref: ${{ github.event.pull_request.head.ref }} | |
- name: Install Foundry | |
uses: foundry-rs/foundry-toolchain@v1 | |
- name: Run Forge Fmt Check | |
run: | | |
forge fmt --check | |
id: fmt_check | |
- name: Run Forge build | |
run: | | |
forge --version | |
forge build --sizes | |
id: build | |
- name: Run Forge tests | |
run: | | |
forge test -vvv | |
id: test | |
- name: Run Code Coverage | |
run: | | |
forge coverage --report lcov | |
id: coverage | |
- name: Generate Coverage Report | |
uses: zgosalvez/github-actions-report-lcov@v1 | |
with: | |
coverage-files: ./lcov.info | |
minimum-coverage: 95 | |
artifact-name: code-coverage-report | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Compare snapshot | |
run: NO_COLOR=1 forge snapshot >> $GITHUB_STEP_SUMMARY | |
- name: Run Forge Snapshot | |
run: | | |
forge snapshot | |
id: snapshot | |
- name: Add & Commit Snapshot | |
uses: EndBug/add-and-commit@v9.1.3 | |
with: | |
default_author: github_actions | |
add: ".gas-snapshot" | |
message: "update gas snapshot" |