Skip to content

Merge pull request #665 from minrk/oauth-allow-none #683

Merge pull request #665 from minrk/oauth-allow-none

Merge pull request #665 from minrk/oauth-allow-none #683

Workflow file for this run

# 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-22.04
timeout-minutes: 10
strategy:
# Keep running even if one variation of the job fail
fail-fast: false
matrix:
python:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
include:
- python: "3.9"
oldest_dependencies: oldest_dependencies
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "${{ matrix.python }}"
- name: Install Python dependencies
run: |
pip install ".[test]"
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
# GitHub action reference: https://github.com/codecov/codecov-action
- uses: codecov/codecov-action@v3