mirror of
https://github.com/jupyterhub/the-littlest-jupyterhub.git
synced 2025-12-18 21:54:05 +08:00
test refactor: slim down workflow for readability
This commit is contained in:
5
.github/integration-test.py
vendored
5
.github/integration-test.py
vendored
@@ -187,10 +187,7 @@ def run_test(
|
|||||||
|
|
||||||
run_container_command(
|
run_container_command(
|
||||||
test_name,
|
test_name,
|
||||||
# We abort pytest after two failures as a compromise between wanting to
|
"/opt/tljh/hub/bin/python3 -m pytest --capture=no {}".format(
|
||||||
# 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(
|
" ".join(
|
||||||
[os.path.join("/srv/src/integration-tests/", f) for f in test_files]
|
[os.path.join("/srv/src/integration-tests/", f) for f in test_files]
|
||||||
)
|
)
|
||||||
|
|||||||
10
.github/workflows/integration-test.yaml
vendored
10
.github/workflows/integration-test.yaml
vendored
@@ -59,16 +59,12 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
python-version: "3.10"
|
python-version: "3.10"
|
||||||
|
|
||||||
- name: Install pytest
|
- name: Install integration-tests/requirements.txt
|
||||||
run: python3 -m pip install pytest
|
run: pip install -r integration-tests/requirements.txt
|
||||||
|
|
||||||
# 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 (Runs in/Builds ${{ matrix.distro_image }} derived image)
|
- name: Run bootstrap tests (Runs in/Builds ${{ matrix.distro_image }} derived image)
|
||||||
run: |
|
run: |
|
||||||
pytest --verbose --maxfail=2 --color=yes --durations=10 --capture=no \
|
pytest --capture=no integration-tests/test_bootstrap.py
|
||||||
integration-tests/test_bootstrap.py
|
|
||||||
timeout-minutes: 20
|
timeout-minutes: 20
|
||||||
env:
|
env:
|
||||||
# integration-tests/test_bootstrap.py will build and start containers
|
# integration-tests/test_bootstrap.py will build and start containers
|
||||||
|
|||||||
12
.github/workflows/unit-test.yaml
vendored
12
.github/workflows/unit-test.yaml
vendored
@@ -82,15 +82,15 @@ jobs:
|
|||||||
|
|
||||||
- name: Install Python dependencies
|
- name: Install Python dependencies
|
||||||
run: |
|
run: |
|
||||||
python3 -m pip install -r dev-requirements.txt
|
pip install -r dev-requirements.txt
|
||||||
python3 -m pip install -e .
|
pip install -e .
|
||||||
|
|
||||||
|
- name: List Python dependencies
|
||||||
|
run: |
|
||||||
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 tests
|
||||||
timeout-minutes: 15
|
timeout-minutes: 15
|
||||||
|
|
||||||
- uses: codecov/codecov-action@v3
|
- uses: codecov/codecov-action@v3
|
||||||
|
|||||||
Reference in New Issue
Block a user