-
Notifications
You must be signed in to change notification settings - Fork 5
79 lines (68 loc) · 1.95 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
# This is a GitHub workflow defining a set of jobs with a set of steps.
# ref: https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions
#
name: Tests
on:
pull_request:
paths-ignore:
- "docs/**"
- "**.md"
- "**.rst"
- ".github/workflows/*"
- "!.github/workflows/test.yaml"
push:
paths-ignore:
- "docs/**"
- "**.md"
- "**.rst"
- ".github/workflows/*"
- "!.github/workflows/test.yaml"
branches-ignore:
- "pre-commit-ci-update-config"
workflow_dispatch:
permissions:
contents: read
jobs:
# Run the tests in various configurations
pytest:
runs-on: ubuntu-22.04
strategy:
# Keep running even if one variation of the job fail
fail-fast: false
matrix:
include:
- python: "3.8"
jupyterhub: "2.0"
- python: "3.9"
jupyterhub: "2"
- python: "3.10"
jupyterhub: "3"
- python: "3.11"
jupyterhub: "4"
steps:
- uses: actions/checkout@v4
# NOTE: actions/setup-python@v4 make use of a cache within the GitHub base
# environment and setup in a fraction of a second.
- name: Install Node v14
uses: actions/setup-node@v4
with:
node-version: "14"
- name: Install Javascript dependencies
run: |
npm install
npm install -g configurable-http-proxy
npm list
- name: Install Python ${{ matrix.python}}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
- name: Install Python dependencies
run: |
pip install --upgrade pip
pip install -e ".[test]" jupyterhub=="${{ matrix.jupyterhub }}.*"
pip freeze
- name: Run the tests
run: |
pytest -v --cov=pytest_jupyterhub tests
- name: Submit codecov report
uses: codecov/codecov-action@v3