Merge pull request #43 from kurtmckee/dependabot/github_actions/githu… #95
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
name: "Test" | |
on: | |
pull_request: | |
push: | |
branches: | |
- "main" | |
- "releases" | |
jobs: | |
test: | |
name: "Test" | |
runs-on: "windows-latest" | |
strategy: | |
matrix: | |
run: | |
- cpythons: | |
- "3.8" | |
- "3.9" | |
- "3.10" | |
- "3.11" | |
- "3.12" | |
steps: | |
- name: "Checkout branch" | |
uses: "actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b" # v4.1.4 | |
- name: "Setup Pythons" | |
id: "setup-python" | |
uses: "actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d" # v5.1.0 | |
with: | |
python-version: "${{ join(matrix.run.cpythons, '\n') }}" | |
allow-prereleases: true | |
- name: "Detect Pythons" | |
uses: "kurtmckee/detect-pythons@38187a5464f266e93e5c1467699f7be2bf521d2e" # v1.1.0 | |
- name: "Restore cache" | |
id: "restore-cache" | |
uses: "actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9" # v4.0.2 | |
with: | |
path: | | |
.mypy_cache/ | |
.tox/ | |
.venv/ | |
key: "test-os=${{ runner.os }}-hash=${{ hashFiles('.python-identifiers', 'pyproject.toml', 'tox.ini', 'requirements/**/*.txt') }}" | |
- name: "Create a virtual environment" | |
if: "steps.restore-cache.outputs.cache-hit == false" | |
run: | | |
python -m venv .venv | |
.venv/Scripts/python -m pip install --upgrade pip setuptools wheel | |
.venv/Scripts/pip install tox | |
- name: "Test" | |
run: | | |
.venv/Scripts/tox run --colored yes -e py${{ join(matrix.run.cpythons, ',py') }},coverage-report-ci,mypy |