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

ci: Rerun pytest tests on main in case of failures #3769

Merged
merged 3 commits into from
Feb 4, 2025
Merged
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
9 changes: 7 additions & 2 deletions .github/workflows/unix_impl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,10 @@ jobs:
python -m pip install --no-deps --no-build-isolation ./libmambapy
- name: Run libmamba Python bindings tests
run: |
python -m pytest libmambapy/tests/ ${{ runner.debug == 'true' && '-v' || '--exitfirst' }}
# Only rerun flaky tests on the `main` branch
python -m pytest libmambapy/tests/ \
${{ runner.debug == 'true' && '-v --capture=tee-sys' || '--exitfirst' }} \
${{ github.ref == 'refs/heads/main' && '--reruns 3' || '' }}
jjerphan marked this conversation as resolved.
Show resolved Hide resolved

mamba_integration_tests_unix:
name: mamba integration tests
Expand Down Expand Up @@ -162,8 +165,10 @@ jobs:
run: |
export TEST_MAMBA_EXE=$(pwd)/build/micromamba/mamba
unset CONDARC # Interferes with tests
# Only rerun flaky tests on the `main` branch
python -m pytest micromamba/tests/ \
${{ runner.debug == 'true' && '-v --capture=tee-sys' || '--exitfirst' }}
${{ runner.debug == 'true' && '-v --capture=tee-sys' || '--exitfirst' }} \
${{ github.ref == 'refs/heads/main' && '--reruns 3' || '' }}

verify_pkg_tests:
name: mamba-content-trust tests
Expand Down
11 changes: 8 additions & 3 deletions .github/workflows/windows_impl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,10 @@ jobs:
python -m pip install --no-deps --no-build-isolation ./libmambapy
- name: Run libmamba Python bindings tests
run: |
python -m pytest libmambapy/tests/ ${{ runner.debug == 'true' && '-v' || '--exitfirst' }}
# Only rerun flaky tests on the `main` branch
python -m pytest libmambapy/tests/ \
${{ runner.debug == 'true' && '-v --capture=tee-sys' || '--exitfirst' }} \
${{ github.ref == 'refs/heads/main' && '--reruns 3' || '' }}
jjerphan marked this conversation as resolved.
Show resolved Hide resolved

mamba_integration_tests_win:
name: mamba integration tests
Expand Down Expand Up @@ -149,5 +152,7 @@ jobs:
$env:TEST_MAMBA_EXE = Join-Path -Path $pwd -ChildPath 'local\bin\mamba.exe'
$env:MAMBA_TEST_SHELL_TYPE='powershell'
Remove-Item -Path "env:CONDARC"
python -m pytest micromamba/tests/ `
${{ runner.debug == 'true' && '-v --capture=tee-sys' || '--exitfirst' }}
# Only rerun flaky tests on the `main` branch
python -m pytest micromamba/tests/ \
${{ runner.debug == 'true' && '-v --capture=tee-sys' || '--exitfirst' }} \
${{ github.ref == 'refs/heads/main' && '--reruns 3' || '' }}
1 change: 1 addition & 0 deletions dev/environment-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ dependencies:
- pytest-asyncio
- pytest-timeout
- pytest-xprocess
- pytest-rerunfailures
- memory_profiler
- requests
- sel(win): pywin32
Expand Down
Loading