zebra/.github/workflows/coverage.yml

49 lines
1.1 KiB
YAML
Raw Normal View History

name: Coverage
2021-02-16 11:05:27 -08:00
on:
2021-06-14 18:36:33 -07:00
workflow_dispatch:
2021-02-16 11:05:27 -08:00
pull_request:
branches:
- main
push:
branches:
- main
jobs:
coverage:
name: Coverage (+nightly)
# The large timeout is to accommodate nightly builds
timeout-minutes: 45
runs-on: ubuntu-latest
2021-02-16 11:05:27 -08:00
steps:
- uses: actions/checkout@v2.3.4
with:
persist-credentials: false
2021-02-16 11:05:27 -08:00
- uses: actions-rs/toolchain@v1.0.7
2021-02-16 11:05:27 -08:00
with:
toolchain: nightly
2021-02-16 11:05:27 -08:00
override: true
profile: minimal
components: llvm-tools-preview
2021-06-14 18:36:33 -07:00
- uses: Swatinem/rust-cache@v1
2021-02-16 11:05:27 -08:00
- name: Install rustfilt symbol demangler
run: |
cargo install rustfilt
- name: Install cargo-llvm-cov cargo command
run: |
cargo install cargo-llvm-cov --version ^0.1.0-alpha.4
- name: Generate code coverage
2021-02-16 11:05:27 -08:00
env:
ZEBRA_SKIP_NETWORK_TESTS: 1
CARGO_INCREMENTAL: 0
run: cargo llvm-cov --lcov > lcov.info
2021-02-16 11:05:27 -08:00
- name: Upload coverage report to Codecov
uses: codecov/codecov-action@v1.5.2