Signature based Collateral Agreement #41
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: Smart Contracts CI | |
on: | |
push: | |
branches: ["main"] | |
pull_request: | |
branches: ["main"] | |
jobs: | |
test: | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest] | |
node-version: [18.x, 20.x] # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ | |
runs-on: ${{ matrix.os }} | |
defaults: | |
run: | |
working-directory: ./packages/contracts | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Install Foundry | |
uses: foundry-rs/foundry-toolchain@v1 | |
with: | |
version: nightly | |
- name: Run Forge build | |
run: | | |
forge --version | |
forge build --via-ir | |
id: build | |
- name: Run Forge tests | |
run: | | |
forge test | |
id: test | |
- name: Run Forge coverage | |
run: | | |
forge coverage --report lcov | |
- name: Upload coverage reports to Codecov | |
uses: codecov/[email protected] | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
slug: nation3/agreements-contracts |