forked from jupyterhub/batchspawner
-
Notifications
You must be signed in to change notification settings - Fork 0
77 lines (69 loc) · 2.25 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# This is a GitHub workflow defining a set of jobs with a set of steps.
# ref: https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-syntax-for-github-actions
#
name: Test
on:
pull_request:
push:
workflow_dispatch:
jobs:
pre-commit:
name: Run pre-commit
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: pre-commit/[email protected]
pytest:
name: "Run pytest"
runs-on: ubuntu-20.04
continue-on-error: ${{ matrix.allow_failure }}
strategy:
# Keep running even if one variation of the job fail
fail-fast: false
matrix:
python-version:
- "3.5"
- "3.9"
JHUB_VER:
- "0.9.6"
- "1.0.0"
- "1.1.0"
- "1.2.0"
- "1.3.0"
allow_failure: [false]
exclude:
# JupyterHub 1.3.0 requires python 3.6+
- JHUB_VER: "1.3.0"
python-version: "3.5"
include:
- JHUB_VER: "master"
python-version: "3.9"
allow_failure: true
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install pytest
pip install -r requirements.txt
- name: Install nodejs dependencies
run: |
sudo npm install -g configurable-http-proxy
# We need to check compatibility with different versions of the JH
# API, including latest development. For that, we also need to
# pull in the dependencies of that old JH version (but we don't
# need conda/npm for our tests).
- name: install JupyterHub
run: |
git clone --quiet --branch ${{ matrix.JHUB_VER }} https://github.com/jupyterhub/jupyterhub.git jupyterhub
pip install --pre -r jupyterhub/dev-requirements.txt
pip install --upgrade pytest
pip install --pre -e jupyterhub
- name: pytest
run: |
pytest --verbose --color=yes --last-failed --cov batchspawner batchspawner/tests