Test/ get available liquidity #59
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: Contracts Coverage | |
on: | |
# Trigger the workflow on pushes to only the 'main' branch (this avoids duplicate checks being run e.g., for dependabot pull requests) | |
push: | |
branches: [ main ] | |
# Trigger the workflow on any pull request | |
pull_request: | |
permissions: read-all | |
jobs: | |
coverage: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@main | |
- name: Set up Scarb | |
uses: software-mansion/setup-scarb@v1 | |
with: | |
scarb-version: "2.8.2" | |
- name: Set up SNForge | |
uses: foundry-rs/setup-snfoundry@v3 | |
with: | |
starknet-foundry-version: "0.30.0" | |
- name: Set up cairo-coverage | |
run: curl -L https://raw.githubusercontent.com/software-mansion/cairo-coverage/main/scripts/install.sh | sh | |
- name: Run tests and generate report | |
run: cd contracts/ && snforge test --coverage | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v4 | |
with: | |
file: ./coverage.lcov | |
token: ${{ secrets.CODECOV_TOKEN }} |