Skip to content

Deploy v1 Factory and Implementation #149

Deploy v1 Factory and Implementation

Deploy v1 Factory and Implementation #149

Workflow file for this run

name: Forge CI
on:
pull_request:
branches:
- main
env:
FOUNDRY_PROFILE: ci
jobs:
forge-test:
name: Run Forge Tests and Checks
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: Run Forge build
run: |
forge --version
forge build --sizes
id: build
- name: Run Forge tests
run: |
forge test -vvv
id: test
- name: Check formatting
run: |
forge fmt --check
id: fmt
- name: Check snapshot
run: |
forge snapshot --check
id: snapshot
forge-coverage:
name: Run Coverage Reporting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly
- name: Install forge dependencies
run: forge install
- name: Install lcov
run: |
sudo apt-get install lcov
id: lcov
- name: Run coverage
run: |
forge coverage --report summary --report lcov
- name: Prune coverage
run: |
lcov --remove ./lcov.info -o ./lcov-filtered.info 'test/*' 'script/*' 'src/utils/*'
- name: Submit coverage to Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: ./lcov-filtered.info
flag-name: foundry
parallel: true
finish:
needs: forge-coverage
if: ${{ always() }}
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@v2
with:
parallel-finished: true