Fixed mod inclusion based on feature. #56
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: Test and Coverage | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- develop | |
- master | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
with: | |
ref: develop | |
- name: Set up Rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: nightly | |
- name: Download grcov | |
run: | | |
curl -L https://github.com/mozilla/grcov/releases/download/v0.8.18/grcov-x86_64-unknown-linux-gnu.tar.bz2 | tar jxf - | |
sudo mv grcov /usr/local/bin/ | |
- name: Install llvm-tools-preview | |
run: rustup component add llvm-tools-preview | |
# - name: Run tests with lu-dog-rwlock-vec | |
# run: cargo test --features lu-dog-rwlock-vec | |
# - name: Clean | |
# run: cargo clean | |
# - name: Run tests with lu-dog-vec | |
# run: cargo test --features lu-dog-vec | |
# - name: Clean | |
# run: cargo clean | |
- name: Build and run tests with coverage | |
# this uses lu-doc-rc, which is the default. | |
run: | | |
CARGO_INCREMENTAL=0 RUSTFLAGS='-Cinstrument-coverage' RUSTDOCFLAGS='-Cinstrument-coverage -Z unstable-options --persist-doctests target/debug/doctestbins' LLVM_PROFILE_FILE='cargo-test-%p-%m.profraw' cargo +nightly test | |
grcov . --binary-path ./target/debug/doctestbins -s . -t lcov --branch --ignore-not-existing --ignore '../*' --ignore "/*" -o coverage.lcov | |
- name: Install lcov | |
run: sudo apt-get install lcov | |
- name: Install lcov_cobertura | |
run: pip install lcov_cobertura | |
- name: Generate coverage report | |
run: | | |
lcov --summary coverage.lcov | |
lcov_cobertura coverage.lcov --output coverage.xml | |
env: | |
CI: true | |
- name: Upload coverage reports to Codecov | |
uses: codecov/codecov-action@v3 | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
with: | |
directory: ./ | |
fail_ci_if_error: true | |
files: ./coverage.xml | |
flags: unittests | |
name: codecov-umbrella | |
verbose: true | |
# - name: Upload coverage report | |
# uses: actions/upload-artifact@v2 | |
# with: | |
# name: coverage | |
# path: | | |
# coverage/ | |
# coverage.lcov | |
# coverage.xml | |
# - name: Comment coverage percentage | |
# uses: unsplash/[email protected] | |
# env: | |
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# with: | |
# msg: 'Coverage: ${{ job.steps[3].outputs.coverage }}' |