-
Notifications
You must be signed in to change notification settings - Fork 134
81 lines (70 loc) · 2.26 KB
/
test.yaml
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
78
79
80
81
# 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: Test
on:
pull_request:
paths-ignore:
- "**.md"
- ".github/workflows/*.yaml"
- "!.github/workflows/test.yaml"
push:
paths-ignore:
- "**.md"
- ".github/workflows/*.yaml"
- "!.github/workflows/test.yaml"
branches-ignore:
- "dependabot/**"
- "pre-commit-ci-update-config"
tags: ["**"]
workflow_dispatch:
jobs:
pytest:
name: Run pytest
runs-on: ${{ matrix.runs-on || 'ubuntu-22.04' }}
strategy:
fail-fast: false
matrix:
include:
# test oldest supported version
- python-version: "3.6"
pip-install-spec: "jupyterhub==1.5.1 sqlalchemy==1.*"
runs-on: ubuntu-20.04 # python 3.6 is only available in 20.04
- python-version: "3.7"
pip-install-spec: "jupyterhub==2.* sqlalchemy==1.*"
- python-version: "3.8"
pip-install-spec: "jupyterhub==3.*"
- python-version: "3.10"
pip-install-spec: "jupyterhub==4.*"
- python-version: "3.11"
pip-install-spec: "jupyterhub==4.*"
- python-version: "3.12"
pip-install-spec: "jupyterhub==4.*"
# test unreleased jupyterhub, failures tolerated
- python-version: "3.X"
pip-install-spec: "git+https://github.com/jupyterhub/jupyterhub"
allow-failure: true
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "18"
- uses: actions/setup-python@v5
with:
python-version: "${{ matrix.python-version }}"
- name: Install Node dependencies
run: |
npm install -g configurable-http-proxy
- name: Install Python dependencies
run: |
pip install --upgrade pip
pip install ${{ matrix.pip-install-spec }}
pip install -e ".[test]"
- name: List dependencies
run: |
pip freeze
- name: pytest
run: |
pytest
# GitHub action reference: https://github.com/codecov/codecov-action
- uses: codecov/codecov-action@v4