Skip to content

Removed unique AnyList. #102

Removed unique AnyList.

Removed unique AnyList. #102

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 }}'