ci: add notes about pytest --maxfail=2 choice

This commit is contained in:
Erik Sundell
2021-10-18 19:47:48 +02:00
parent 1fb43c4b3b
commit 1d6ac29145
3 changed files with 9 additions and 0 deletions

View File

@@ -120,6 +120,9 @@ def run_test(image_name, test_name, bootstrap_pip_spec, test_files, upgrade, ins
)
run_container_command(
test_name,
# We abort pytest after two failures as a compromise between wanting to
# avoid a flood of logs while still understanding if multiple tests
# would fail.
'/opt/tljh/hub/bin/python3 -m pytest --verbose --maxfail=2 --color=yes --durations=10 --capture=no {}'.format(
' '.join([os.path.join('/srv/src/integration-tests/', f) for f in test_files])
)

View File

@@ -115,6 +115,9 @@ jobs:
- name: Install pytest
run: python3 -m pip install pytest
# We abort pytest after two failures as a compromise between wanting to
# avoid a flood of logs while still understanding if multiple tests would
# fail.
- name: Run bootstrap tests
run: |
pytest --verbose --maxfail=2 --color=yes --durations=10 --capture=no \

View File

@@ -92,6 +92,9 @@ jobs:
python3 -m pip install -e .
pip freeze
# We abort pytest after two failures as a compromise between wanting to
# avoid a flood of logs while still understanding if multiple tests would
# fail.
- name: Run unit tests
run: pytest --verbose --maxfail=2 --color=yes --durations=10 --cov=tljh tests/
timeout-minutes: 15