back to dev #29
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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: Tests | |
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: | |
test: | |
runs-on: ${{ matrix.runs-on }} | |
timeout-minutes: 10 | |
strategy: | |
# Keep running even if one variation of the job fail | |
fail-fast: false | |
matrix: | |
include: | |
- python-version: "3.6" | |
runs-on: ubuntu-20.04 | |
- python-version: "3.7" | |
runs-on: ubuntu-22.04 | |
- python-version: "3.8" | |
runs-on: ubuntu-22.04 | |
- python-version: "3.9" | |
runs-on: ubuntu-latest | |
- python-version: "3.10" | |
runs-on: ubuntu-latest | |
- python-version: "3.11" | |
runs-on: ubuntu-latest | |
- python-version: "3.12" | |
runs-on: ubuntu-latest | |
- python-version: "3.x" | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
# preserve pip cache to speed up installation | |
- uses: actions/cache@v4 | |
with: | |
path: ~/.cache/pip | |
# Look to see if there is a cache hit for the corresponding requirements file | |
key: ${{ runner.os }}-pip-${{ hashFiles('*requirements.txt') }} | |
restore-keys: | | |
${{ runner.os }}-pip- | |
- name: Install Python dependencies | |
run: | | |
pip install --upgrade pip | |
pip install --upgrade . -r dev-requirements.txt | |
pip freeze | |
- name: Run tests | |
run: | | |
pytest -v --color=yes --cov=firstuseauthenticator | |
# GitHub action reference: https://github.com/codecov/codecov-action | |
- uses: codecov/codecov-action@v4 |