Skip to content

Merge pull request #46 from kurtmckee/pre-commit-ci-update-config #101

Merge pull request #46 from kurtmckee/pre-commit-ci-update-config

Merge pull request #46 from kurtmckee/pre-commit-ci-update-config #101

Workflow file for this run

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@692973e3d937129bcbf40652eb9f2f61becf3332" # v4.1.7
- 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