Skip to content

Return wallet events when applying updates (3.0 milestone) #516

Return wallet events when applying updates (3.0 milestone)

Return wallet events when applying updates (3.0 milestone) #516

Workflow file for this run

name: Code Coverage
# Generates code coverage reports using grcov and uploads results to Coveralls.
# Runs on every push and pull request to track test coverage metrics.
# Uploads coverage data to Coveralls for tracking and produces an HTML report artifact for download.
on: [push, pull_request]
permissions: {}
jobs:
Codecov:
name: Code Coverage
runs-on: ubuntu-latest
env:
RUSTFLAGS: "-Cinstrument-coverage"
RUSTDOCFLAGS: "-Cinstrument-coverage"
LLVM_PROFILE_FILE: "./target/coverage/%p-%m.profraw"
steps:
- name: Checkout
uses: actions/checkout@v5
with:
persist-credentials: false
- name: Install lcov tools
run: sudo apt-get install lcov -y
# This action automatically reads and applies rust-toolchain.toml
- name: Install Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
components: llvm-tools-preview
cache: true
- name: Install grcov
run: if [[ ! -e ~/.cargo/bin/grcov ]]; then cargo install grcov; fi
- name: Test
run: cargo test --all-features
- name: Make coverage directory
run: mkdir coverage
- name: Run grcov
run: grcov . --binary-path ./target/debug/ -s . -t lcov --branch --ignore-not-existing --keep-only 'src/**' --ignore 'tests/**' --ignore 'examples/**' -o ./coverage/lcov.info
- name: Generate HTML coverage report
run: genhtml -o coverage-report.html --ignore-errors unmapped ./coverage/lcov.info
- name: Coveralls upload
# Action pinned at tag 2.3.6
uses: coverallsapp/github-action@648a8eb78e6d50909eff900e4ec85cab4524a45b
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
file: ./coverage/lcov.info
format: lcov
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: coverage-report
path: coverage-report.html