From 3d512916851f8365e99b17007085286c36879135 Mon Sep 17 00:00:00 2001 From: Miles Liu Date: Thu, 17 Nov 2022 21:16:05 +0800 Subject: [PATCH] CI: fix FreeBSD CI passed when tests failed --- .github/workflows/CICD.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/CICD.yml b/.github/workflows/CICD.yml index 91eabbeec..cfb0d8238 100644 --- a/.github/workflows/CICD.yml +++ b/.github/workflows/CICD.yml @@ -939,14 +939,16 @@ jobs: cargo -V rustc -V # + # To ensure that files are cleaned up, we don't want to exit on error + set +e cd "${WORKSPACE}" unset FAULT cargo build || FAULT=1 - cargo test --features "${{ matrix.job.features }}" || FAULT=1 - cargo test --features "${{ matrix.job.features }}" -p uucore || FAULT=1 + if (test -z "\$FAULT"); then cargo test --features '${{ matrix.job.features }}' || FAULT=1 ; fi + if (test -z "\$FAULT"); then cargo test --features '${{ matrix.job.features }}' -p uucore || FAULT=1 ; fi # Clean to avoid to rsync back the files cargo clean - if (test -n "$FAULT"); then exit 1 ; fi + if (test -n "\$FAULT"); then exit 1 ; fi EOF coverage: