b7865b27ec
* fix coverage workflow * fix action * do not run tests * build binaries * clean before tests * only compile tests * clean dir * remove intermediate artficats
57 lines
1.7 KiB
YAML
57 lines
1.7 KiB
YAML
on:
|
|
pull_request:
|
|
push:
|
|
branches:
|
|
- master
|
|
|
|
name: Codecov
|
|
|
|
jobs:
|
|
test:
|
|
name: Test
|
|
env:
|
|
RUSTFLAGS: -C instrument-coverage
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
with:
|
|
submodules: true
|
|
- uses: arduino/setup-protoc@v3
|
|
with:
|
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
|
- name: Checkout submodules
|
|
run: git submodule update --init --recursive
|
|
- 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 }}
|
|
- run: |
|
|
cargo binstall -y grcov;
|
|
cargo build --no-default-features --features libp2p
|
|
rm -rf target/debug/{build,incremental,deps}
|
|
cargo test --no-default-features --features libp2p --no-run
|
|
rm -rf target/debug/{build,incremental,deps}
|
|
mkdir /tmp/cov;
|
|
grcov . --binary-path ./target/debug/ -s . -t lcov --branch --ignore-not-existing --ignore '../*' --ignore "/*" -o /tmp/cov/tests.lcov;
|
|
env:
|
|
SLOW_TEST_ENV: true
|
|
RISC0_DEV_MODE: true
|
|
- uses: actions/upload-artifact@v3
|
|
if: failure()
|
|
with:
|
|
name: integration-test-artifacts
|
|
path: tests/.tmp*
|
|
- uses: codecov/codecov-action@v3
|
|
with:
|
|
directory: /tmp/cov/
|
|
name: nomos-node-codecov
|