Skip to content

Maintenance/ci script #2

Maintenance/ci script

Maintenance/ci script #2

Workflow file for this run

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"