From 44d93ed9dda84049b4e2d533d7e440e0b574243a Mon Sep 17 00:00:00 2001 From: zacharyburnett Date: Mon, 24 Jun 2024 13:38:10 -0400 Subject: [PATCH] use conditional ifs instead of continue-of-error --- .github/workflows/tox.yml | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/.github/workflows/tox.yml b/.github/workflows/tox.yml index b3b4278..f786f3d 100644 --- a/.github/workflows/tox.yml +++ b/.github/workflows/tox.yml @@ -251,21 +251,29 @@ jobs: steps: - uses: actions/checkout@v4 with: - fetch-depth: 0 lfs: true submodules: ${{ inputs.submodules }} ref: ${{ inputs.checkout_ref }} - uses: actions/download-artifact@v4 + id: download with: pattern: .coverage.* merge-multiple: true - - uses: actions/setup-python@v5 + - run: | + [ "$(ls -A .coverage*)" ] && exit 0 || exit 1 + continue-on-error: true + - if: success() + uses: actions/setup-python@v5 with: python-version: "3.12" - continue-on-error: true - - run: python -Im pip install --upgrade coverage[toml] - continue-on-error: true - - run: python -Im coverage combine - continue-on-error: true - - run: python -Im coverage report -i -m --format=markdown >> $GITHUB_STEP_SUMMARY - continue-on-error: true + - if: success() + name: generate coverage report + run: | + python -Im pip install --upgrade coverage[toml] + python -Im coverage combine + python -Im coverage report -i -m --format=markdown >> $GITHUB_STEP_SUMMARY + - if: success() + uses: actions/upload-artifact@v4 + with: + name: .coverage + path: .coverage