mirror of
https://github.com/jupyterhub/the-littlest-jupyterhub.git
synced 2025-12-18 21:54:05 +08:00
ci: add notes about pytest --maxfail=2 choice
This commit is contained in:
3
.github/integration-test.py
vendored
3
.github/integration-test.py
vendored
@@ -120,6 +120,9 @@ def run_test(image_name, test_name, bootstrap_pip_spec, test_files, upgrade, ins
|
|||||||
)
|
)
|
||||||
run_container_command(
|
run_container_command(
|
||||||
test_name,
|
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(
|
'/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])
|
' '.join([os.path.join('/srv/src/integration-tests/', f) for f in test_files])
|
||||||
)
|
)
|
||||||
|
|||||||
3
.github/workflows/integration-test.yaml
vendored
3
.github/workflows/integration-test.yaml
vendored
@@ -115,6 +115,9 @@ jobs:
|
|||||||
- name: Install pytest
|
- name: Install pytest
|
||||||
run: python3 -m pip 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
|
- name: Run bootstrap tests
|
||||||
run: |
|
run: |
|
||||||
pytest --verbose --maxfail=2 --color=yes --durations=10 --capture=no \
|
pytest --verbose --maxfail=2 --color=yes --durations=10 --capture=no \
|
||||||
|
|||||||
3
.github/workflows/unit-test.yaml
vendored
3
.github/workflows/unit-test.yaml
vendored
@@ -92,6 +92,9 @@ jobs:
|
|||||||
python3 -m pip install -e .
|
python3 -m pip install -e .
|
||||||
pip freeze
|
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
|
- name: Run unit tests
|
||||||
run: pytest --verbose --maxfail=2 --color=yes --durations=10 --cov=tljh tests/
|
run: pytest --verbose --maxfail=2 --color=yes --durations=10 --cov=tljh tests/
|
||||||
timeout-minutes: 15
|
timeout-minutes: 15
|
||||||
|
|||||||
Reference in New Issue
Block a user