Skip to content

Commit 2b921f1

Browse files
authored
Merge pull request #1202 from consideRatio/pr/ci-test-build-speedup
2 parents fda336b + 189a70e commit 2b921f1

File tree

2 files changed

+19
-9
lines changed

2 files changed

+19
-9
lines changed

.github/workflows/test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,16 +147,16 @@ jobs:
147147
- name: Run main tests
148148
if: matrix.test == 'main'
149149
# running the "main" tests means "all tests that aren't auth"
150-
run: pytest -m "not auth" -vx --cov binderhub
150+
run: pytest -m "not auth" -vx --cov binderhub --durations=10
151151
- name: Run auth tests
152152
if: matrix.test == 'auth'
153153
# running the "auth" tests means "all tests that are marked as auth"
154-
run: pytest -m "auth" -vx --cov binderhub
154+
run: pytest -m "auth" -vx --cov binderhub --durations=10
155155
- name: Run helm tests
156156
if: matrix.test == 'helm'
157157
run: |
158158
export BINDER_URL=http://localhost:30901
159-
pytest -m "remote" -vx --cov binderhub
159+
pytest -m "remote" -vx --cov binderhub --durations=10
160160
- name: Kubernetes namespace report
161161
if: ${{ always() }}
162162
run: |

binderhub/tests/test_build.py

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,29 @@
1515
from .utils import async_requests
1616

1717

18+
# We have optimized this slow test, for more information, see the README of
19+
# https://github.com/binderhub-ci-repos/minimal-dockerfile.
1820
@pytest.mark.asyncio(timeout=900)
1921
@pytest.mark.parametrize("slug", [
20-
"gh/binderhub-ci-repos/requirements/d687a7f9e6946ab01ef2baa7bd6d5b73c6e904fd",
21-
"git/{}/d687a7f9e6946ab01ef2baa7bd6d5b73c6e904fd".format(
22-
quote("https://github.com/binderhub-ci-repos/requirements", safe='')
22+
# git/ Git repo provider
23+
"git/{}/HEAD".format(
24+
quote("https://github.com/consideratio/cached-minimal-dockerfile", safe='')
2325
),
24-
"git/{}/master".format(
25-
quote("https://github.com/binderhub-ci-repos/requirements", safe='')
26+
"git/{}/596b52f10efb0c9befc0c4ae850cc5175297d71c".format(
27+
quote("https://github.com/binderhub-ci-repos/cached-minimal-dockerfile", safe='')
2628
),
27-
"gl/minrk%2Fbinderhub-ci/0d4a217d40660efaa58761d8c6084e7cf5453cca",
29+
# gh/ GitHub repo provider
30+
"gh/binderhub-ci-repos/cached-minimal-dockerfile/HEAD",
31+
"gh/binderhub-ci-repos/cached-minimal-dockerfile/596b52f10efb0c9befc0c4ae850cc5175297d71c",
32+
# gl/ GitLab repo provider
33+
"gl/binderhub-ci-repos%2Fcached-minimal-dockerfile/HEAD",
34+
"gl/binderhub-ci-repos%2Fcached-minimal-dockerfile/596b52f10efb0c9befc0c4ae850cc5175297d71c",
2835
])
2936
@pytest.mark.remote
3037
async def test_build(app, needs_build, needs_launch, always_build, slug, pytestconfig):
38+
"""
39+
Test build a repo that is very quick and easy to build.
40+
"""
3141
# can't use mark.github_api since only some tests here use GitHub
3242
if slug.startswith('gh/') and "not github_api" in pytestconfig.getoption('markexpr'):
3343
pytest.skip("Skipping GitHub API test")

0 commit comments

Comments
 (0)