forked from jupyterhub/oauthenticator
-
Notifications
You must be signed in to change notification settings - Fork 0
73 lines (64 loc) · 1.88 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
# 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/**"
- ".github/workflows/*.yaml"
- "!.github/workflows/test.yaml"
push:
paths-ignore:
- "docs/**"
- ".github/workflows/*.yaml"
- "!.github/workflows/test.yaml"
branches-ignore:
- "dependabot/**"
- "pre-commit-ci-update-config"
tags: ["**"]
workflow_dispatch:
env:
OAUTH2_TOKEN_URL: "token_url"
OAUTH2_USERDATA_URL: "userdata_url"
jobs:
test:
runs-on: ubuntu-20.04
timeout-minutes: 10
strategy:
# Keep running even if one variation of the job fail
fail-fast: false
matrix:
python:
- "3.6"
- "3.7"
- "3.8"
- "3.9"
- "3.10"
include:
- python: "3.9"
oldest_dependencies: oldest_dependencies
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: "${{ matrix.python }}"
- name: Install Python dependencies
run: |
pip install --upgrade . -r test-requirements.txt
pip list
- name: Downgrade to oldest dependencies
if: matrix.oldest_dependencies != ''
# take any dependencies in requirements.txt such as jupyterhub>=1.2 and
# transform them to jupyterhub==1.2 so we can run tests with the
# earliest-supported versions
run: |
cat requirements.txt | grep '>=' | sed -e 's@>=@==@g' > oldest-requirements.txt
pip install -r oldest-requirements.txt
pip list
- name: Run tests
run: |
pytest -v --color=yes --cov=oauthenticator oauthenticator
- name: Submit codecov report
run: |
codecov