actions-rs / tarpaulin

📈 GitHub Action for code coverage reporting with tarpaulin
MIT License
89 stars 16 forks source link

cargo-tarpaulin step "succeeds" even when build fails #10

Open scouten opened 4 years ago

scouten commented 4 years ago

Do the checklist before filing an issue:

Description

A build failure does not lead to the tarpaulin step being flagged as failed.

Workflow code

Paste that part of your workflow yaml file that causes the bug in here.

Alternatively you can remove that code block and insert direct link to your workflow file.
Ensure that link points to the specific commit, and not just to the master branch.

Action output

https://github.com/adobe/xmp-toolkit-rs/pull/1/checks?check_run_id=1058204332

Run actions-rs/tarpaulin@v0.1
  with:
    version: 0.14.2
    args: --ignore-tests --all-features -- --test-threads 1
    out-type: Xml
[tarpaulin] downloading cargo-tarpaulin from https://github.com/xd009642/tarpaulin/releases/download/0.14.2/cargo-tarpaulin-0.14.2-travis.tar.gz
/bin/tar xz --warning=no-unknown-keyword -C /home/runner/work/_temp/94692e78-9cd6-4b23-807f-7d268eaa3f73 -f /home/runner/work/_temp/abd17f7f-9dcc-420d-acb4-af950340e394
[tarpaulin] running tests with coverage tracking
/usr/share/rust/.cargo/bin/cargo tarpaulin --out Xml --ignore-tests --all-features -- --test-threads 1
[INFO tarpaulin] Creating config
[INFO tarpaulin] Running Tarpaulin
[INFO tarpaulin] Building project
   Compiling libc v0.2.76
   Compiling getrandom v0.1.14
   Compiling cfg-if v0.1.10
   Compiling ppv-lite86 v0.2.9
   Compiling fs_extra v1.2.0
   Compiling cc v1.0.59
   Compiling bitflags v1.2.1
   Compiling remove_dir_all v0.5.3
   Compiling rand_core v0.5.1
   Compiling xmp_toolkit v0.1.0 (/home/runner/work/xmp-toolkit-rs/xmp-toolkit-rs)
   Compiling rand_chacha v0.2.2
error: failed to run custom build command for `xmp_toolkit v0.1.0 (/home/runner/work/xmp-toolkit-rs/xmp-toolkit-rs)`
##[error]failed to run custom build command for `xmp_toolkit v0.1.0 (/home/runner/work/xmp-toolkit-rs/xmp-toolkit-rs)`
Caused by:
  process didn't exit successfully: `/home/runner/work/xmp-toolkit-rs/xmp-toolkit-rs/target/debug/build/xmp_toolkit-809fbe53a563efd5/build-script-build` (exit code: 101)

... (stdout log from build.rs failure snipped, not relevant to this bug) ...

--- stderr
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Error { kind: PermissionDenied, message: "Permission denied (os error 13)" }', build.rs:236:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

warning: build failed, waiting for other jobs to finish...
##[warning]error: build failed
[INFO tarpaulin] Coverage Results:
|| Tested/Total Lines:
|| 
NaN% coverage, 0/0 lines covered

Despite the "warning," the cargo-tarpaulin step succeeded and the overall check passed.

https://github.com/adobe/xmp-toolkit-rs/pull/1/checks?check_run_id=1058204332

Expected behavior

If the build fails, the cargo-tarpaulin action should also fail.

This feels like a silent failure.