provided workflow
@@ -66,48 +66,19 @@ jobs:
-
- codecov:
- name : codecov
- runs-on: ubuntu-20.04
+ coverage:
+ runs-on: ubuntu-latest
steps:
- - name : allow add cargo to path
- run: echo "ACTIONS_ALLOW_UNSECURE_COMMANDS=true" >> $GITHUB_ENV
-
- - name: Checkout repository
- uses: actions/checkout@v2
-
- - run : './ressources/install_all_compilers_ci.sh'
-
- - uses: dlang-community/setup-dlang@v1
-
- - uses: actions-rs/toolchain@v1
- with:
- toolchain: nightly
- override: true
-
-
- - run: rm -rf ./target *.prof*
- - run: export RUSTFLAGS="-Zinstrument-coverage"
- - run: export LLVM_PROFILE_FILE="sniprunlcov-%p-%m.profraw"
- - run: cargo install grcov
- - run: rustup component add llvm-tools-preview
-
-
-
-
- - name: Build
- run: cargo build
-
- - name: Test
- run: cargo test --features ignore_in_ci && cargo test --test integration
-
- - name: Generate report
- run: grcov . --binary-path ./target/debug/ -s . -t lcov --branch --ignore-not-existing -o ./lcov.info
-
- - name: Upload to codecov.io
- uses: codecov/codecov-action@v1.0.2
+ - uses: actions/checkout@v2
+ - name: Install Rust
+ run: rustup toolchain install nightly --component llvm-tools-preview
+ - name: Install cargo-llvm-cov
+ run: curl -LsSf https://github.com/taiki-e/cargo-llvm-cov/releases/latest/download/cargo-llvm-cov-x86_64-unknown-linux-gnu.tar.gz | tar xzf - -C ~/.cargo/bin
+ - name: Generate code coverage
+ run: cargo llvm-cov --all-features --workspace --lcov --output-path lcov.info
+ - name: Upload coverage to Codecov
+ uses: codecov/codecov-action@v1
with:
- token: ${{secrets.CODECOV_TOKEN}}
-
-
+ token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
+ files: lcov.info
+ fail_ci_if_error: true
