From c31c28b37ee7da209e9837466cd7fae0bffadc47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Ri=C3=9Fe?= Date: Wed, 15 Nov 2023 13:38:18 +0100 Subject: [PATCH] Do not retry failed tests in CI Tests that do not consistently pass are broken tests and should be fixed. Failed tests should not be retried to avoid accidentally adding new broken tests. --- .github/workflows/testing.yml | 16 ++++------------ .github/workflows/testing_gsoc.yml | 14 +++----------- 2 files changed, 7 insertions(+), 23 deletions(-) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index f33f03f..9059826 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -1,6 +1,6 @@ name: Pytest fs_filepicker -on: +on: workflow_call: inputs: xdist: @@ -82,11 +82,7 @@ jobs: && source /opt/conda/etc/profile.d/conda.sh \ && source /opt/conda/etc/profile.d/mamba.sh \ && mamba activate fsfp-${{ inputs.branch_name }}-env \ - && pytest -v --durations=20 --reverse --cov=fslib tests \ - || (for i in {1..5} \ - ; do pytest tests -v --durations=0 --reverse --last-failed --lfnf=none \ - && break \ - ; done) + && pytest -v --durations=20 --reverse --cov=fslib tests - name: Run tests in parallel if: ${{ success() && inputs.xdist == 'yes' }} @@ -96,15 +92,11 @@ jobs: && source /opt/conda/etc/profile.d/conda.sh \ && source /opt/conda/etc/profile.d/mamba.sh \ && mamba activate fsfp-${{ inputs.branch_name }}-env \ - && pytest -vv -n 6 --dist loadfile --max-worker-restart 0 tests \ - || (for i in {1..5} \ - ; do pytest -vv -n 6 --dist loadfile --max-worker-restart 0 tests --last-failed --lfnf=none \ - && break \ - ; done) + && pytest -vv -n 6 --dist loadfile --max-worker-restart 0 tests - name: Collect coverage if: ${{ success() && inputs.event_name == 'push' && inputs.branch_name == 'develop' && inputs.xdist == 'no'}} - env: + env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | cd $GITHUB_WORKSPACE \ diff --git a/.github/workflows/testing_gsoc.yml b/.github/workflows/testing_gsoc.yml index e5571c6..3102cd9 100644 --- a/.github/workflows/testing_gsoc.yml +++ b/.github/workflows/testing_gsoc.yml @@ -70,11 +70,7 @@ jobs: && source /opt/conda/etc/profile.d/conda.sh \ && source /opt/conda/etc/profile.d/mamba.sh \ && mamba activate fsfp-develop-env \ - && pytest -v --durations=20 --reverse --cov=mslib tests \ - || (for i in {1..5} \ - ; do pytest tests -v --durations=0 --reverse --last-failed --lfnf=none \ - && break \ - ; done) + && pytest -v --durations=20 --reverse --cov=mslib tests - name: Run tests in parallel @@ -85,15 +81,11 @@ jobs: && source /opt/conda/etc/profile.d/conda.sh \ && source /opt/conda/etc/profile.d/mamba.sh \ && mamba activate fsfp-develop-env \ - && pytest -vv -n 6 --dist loadfile --max-worker-restart 0 tests \ - || (for i in {1..5} \ - ; do pytest -vv -n 6 --dist loadfile --max-worker-restart 0 tests --last-failed --lfnf=none \ - && break \ - ; done) + && pytest -vv -n 6 --dist loadfile --max-worker-restart 0 tests - name: Collect coverage if: ${{ success() && inputs.event_name == 'push' && inputs.branch_name == 'develop' && inputs.xdist == 'no'}} - env: + env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | cd $GITHUB_WORKSPACE \