Conditional skip of code coverage

This commit is contained in:
bitfl0wer 2023-08-26 18:02:21 +02:00
parent 878413e0da
commit c4bd33205c
1 changed files with 10 additions and 3 deletions

View File

@ -35,6 +35,13 @@ jobs:
cache-all-crates: "true"
- name: Build, Test and Publish Coverage
run: |
if [ -n "${{ secrets.COVERALLS_REPO_TOKEN }}" ]; then
curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash
cargo binstall --no-confirm cargo-tarpaulin --force
cargo tarpaulin --all-features --avoid-cfg-tarpaulin --tests --verbose --skip-clean --coveralls ${{ secrets.COVERALLS_REPO_TOKEN }} --timeout 120
else
echo "Code Coverage step is skipped on forks!"
cargo build --verbose --all-features
cargo test --verbose --all-features
fi