Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not retry failed tests in CI #62

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 4 additions & 12 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Pytest fs_filepicker

on:
on:
workflow_call:
inputs:
xdist:
Expand Down Expand Up @@ -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' }}
Expand All @@ -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 \
Expand Down
14 changes: 3 additions & 11 deletions .github/workflows/testing_gsoc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 \
Expand Down