fix: update my_codecov #50
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
on: | |
push: | |
branches: | |
- my-codecov | |
- master | |
workflow_dispatch: | |
name: My Codecov 3 | |
jobs: | |
test: | |
env: | |
CARGO_INCREMENTAL: 0 | |
RUSTFLAGS: "-C instrument-coverage" | |
LLVM_PROFILE_FILE: "nomos-node-%p-%m.profraw" | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- name: Remove unwanted software | |
uses: ./.github/actions/prune-vm | |
- uses: arduino/setup-protoc@v3 | |
with: | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
- uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
override: true | |
components: llvm-tools-preview | |
- uses: cargo-bins/cargo-binstall@main | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Install risc0 | |
run: cargo binstall -y cargo-risczero && cargo risczero install | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Cargo build | |
uses: actions-rs/cargo@v1 | |
with: | |
command: build | |
args: --all --no-default-features --features libp2p | |
- name: Run tests | |
uses: actions-rs/cargo@v1 | |
env: | |
RISC0_DEV_MODE: true | |
CONSENSUS_SLOT_TIME: 5 | |
with: | |
command: test | |
args: --all --no-default-features --features libp2p | |
- name: Run Grcov | |
run: | | |
cargo binstall -y grcov; | |
mkdir /tmp/coverage; | |
grcov . --binary-path ./target/debug -s . -t lcov --branch --ignore-not-existing --ignore '../*' --ignore "/*" -o /tmp/coverage/tests.lcov; | |
- uses: actions/upload-artifact@v3 | |
if: failure() | |
with: | |
name: integration-test-artifacts | |
path: tests/.tmp* | |
- uses: codecov/[email protected] | |
with: | |
directory: /tmp/cov/ | |
name: nomos-node-codecov | |
token: ${{ secrets.CODECOV_TOKEN }} | |