From 6924d05635702a460d0da32b981dbf127056acc9 Mon Sep 17 00:00:00 2001 From: Julien Eluard Date: Wed, 18 Dec 2024 15:36:00 +0100 Subject: [PATCH] fix: do not trigger GH status checks --- .github/workflows/CI.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index b12220b..f283e60 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -27,7 +27,6 @@ jobs: target: aarch64-apple-darwin timeout-minutes: 30 runs-on: ${{ matrix.environments.runner }} - continue-on-error: ${{ matrix.environments.optional || false }} steps: - uses: actions/checkout@v4 - uses: Swatinem/rust-cache@v2 @@ -39,4 +38,12 @@ jobs: run: cargo clippy --all-targets --all-features -- -D warnings - run: rustup target add ${{ matrix.environments.target }} - name: Run tests - run: cargo test --locked --all-features --workspace --target ${{ matrix.environments.target }} + run: | + cargo test --locked --all-features --workspace --target ${{ matrix.environments.target }} + exitcode="$?" + if [[ "${{ matrix.environments.optional }}" == "true" && "$exitcode" != "0" ]] ; then + # Propagate failure as a warning + # but do not fail the job + echo "::warning::Tests failed with exit code $exitcode" + exit 0 + fi \ No newline at end of file