add Python 3.12 to CI #100
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: tests | |
on: | |
push: | |
branches: | |
- "*" | |
pull_request: | |
jobs: | |
test: | |
name: Python ${{ matrix.python-version }} on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.5", "3.6", "3.7", "3.8", "3.9", "3.10", "3.11", "3.12"] | |
os: [ubuntu-latest, windows-latest, macOS-latest] | |
exclude: | |
# No longer supported on GitHub CI. | |
- python-version: 3.5 | |
os: "ubuntu-latest" | |
- python-version: 3.6 | |
os: "ubuntu-latest" | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
# Confirm that the `python` maps to the version we just installed. | |
# PowerShell on Windows does this differently than the Unix shells. | |
- run: which python ; python --version ; which pip ; pip --version | |
if: matrix.os != 'windows-latest' | |
- run: get-command python ; python --version ; get-command pip ; pip --version | |
if: matrix.os == 'windows-latest' | |
- run: git --version | |
# macOS doesn't currently have Mercurial installed by default. | |
- run: pip install wheel && pip install mercurial | |
if: matrix.os == 'macOS-latest' | |
# Install test dependencies, like flake8. | |
- run: pip install -r ./requirements-dev.txt | |
# Run tests. | |
- run: python test.py -v |