test nightly installation #10
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: Coverage | |
on: | |
# pull_request: | |
push: | |
branches: | |
- duty/codecov | |
- develop | |
env: | |
CARGO_INCREMENTAL: 0 | |
SKIP_WASM_BUILD: 1 | |
LLVM_PROFILE_FILE: "sora2-%p-%m.profraw" | |
RUST_BACKTRACE: short | |
RUSTFLAGS: "-Cinstrument-coverage" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Cache cargo registry | |
uses: actions/cache@v2 | |
with: | |
path: | | |
~/.cargo/registry | |
~/.cargo/git | |
target | |
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }} | |
- name: Setup Rust | |
uses: ATiltedTree/[email protected] | |
with: | |
rust-version: nightly-2024-01-15 | |
- name: Install llvm tools | |
run: rustup component add llvm-tools-preview | |
- name: Install grcov | |
run: cargo install grcov | |
- name: Install packages | |
run: | | |
apt-get update | |
protobuf-compiler | |
- name: Build and test | |
run: cargo test -r | |
- name: Generate Cobertura report | |
run: | | |
cargo tarpaulin --out Xml | |
grcov . --binary-path ./target/debug -s . -t cobertura --branch -o cobertura.xml --ignore-not-existing --ignore "/opt/cargo/**" "target/debug" "node/src" | |
- name: Upload Cobertura report | |
uses: actions/upload-artifact@v2 | |
with: | |
name: cobertura-report | |
path: cobertura.xml | |
- name: Upload to Codecov | |
uses: codecov/codecov-action@v2 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} |