Conditional skip of code coverage
This commit is contained in:
parent
878413e0da
commit
c4bd33205c
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue