-
Notifications
You must be signed in to change notification settings - Fork 368
53 lines (43 loc) · 1.21 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# This is a GitHub workflow defining a set of jobs with a set of steps.
# ref: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions
#
name: Tests
on:
schedule:
# Weekly, at 03:00 on Monday UTC time
- cron: "0 3 * * 1"
pull_request:
push:
workflow_dispatch:
jobs:
# Run tests
test:
name: Test
runs-on: ubuntu-22.04
timeout-minutes: 10
strategy:
matrix:
example:
- basic-example
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.x
- name: Get Docker version
run: |
docker --version
- name: Install pytest
run: pip install pytest requests
- name: Add a test admin token
run: cat ci/config_token.py >> ${{ matrix.example }}/jupyterhub_config.py
- name: Run JupyterHub
working-directory: ${{ matrix.example }}
run: docker compose up --detach
- name: Test
working-directory: ${{ matrix.example }}
run: pytest --verbose --capture=no
- name: Print docker compose logs
if: always()
working-directory: ${{ matrix.example }}
run: docker compose logs