chore(pre-commit): switch black to -pre-commit-mirror #86
Workflow file for this run
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: Run tests | |
on: | |
pull_request: | |
push: | |
branches: | |
- master | |
jobs: | |
pre-commit: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install dependencies | |
run: | | |
set -euxo pipefail | |
python3 -m venv venv # due to mypy through pre-commit, venv-run (doh) | |
venv/bin/python3 -m pip install -e ".[dev]" | |
- uses: pre-commit/[email protected] | |
nox: | |
name: Nox | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: | |
- "3.7" | |
- "3.8" | |
- "3.9" | |
- "3.10" | |
- "3.11" | |
- "3.12.0-alpha - 3.12" | |
- "pypy-3.9" | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: excitedleigh/[email protected] | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Run tests | |
run: | | |
v="${{ matrix.python-version }}" | |
v=${v##* } # "3.12.0-alpha - 3.12" -> "3.12" | |
v=${v//-} # "pypy-3.9" -> "pypy3.9" | |
nox --force-color --python "$v" |