CI: Add Python 3.13 #65
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: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
workflow_dispatch: | |
jobs: | |
test: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
include: | |
# macOS (12, 13 -- Intel, 14 -- ARM) | |
- os: macos-12 | |
python-version: '2.7' | |
- os: macos-12 | |
python-version: '3.8' | |
setup-python: true | |
- os: macos-12 | |
python-version: '3.9' | |
setup-python: true | |
- os: macos-13 | |
python-version: '3.10' | |
setup-python: true | |
- os: macos-13 | |
python-version: '3.11' | |
setup-python: true | |
- os: macos-13 | |
python-version: '3.12' | |
setup-python: true | |
- os: macos-14 | |
python-version: '3.13' | |
# Windows | |
- os: windows-2019 | |
python-version: '3.7' | |
- os: windows-2019 | |
python-version: '3.8' | |
setup-python: true | |
- os: windows-2022 | |
python-version: '3.9' | |
- os: windows-2022 | |
python-version: '3.10' | |
setup-python: true | |
- os: windows-2022 | |
python-version: '3.11' | |
setup-python: true | |
- os: windows-2022 | |
python-version: '3.12' | |
setup-python: true | |
- os: windows-2022 | |
python-version: '3.13' | |
setup-python: true | |
# Ubuntu | |
- os: ubuntu-20.04 | |
python-version: '3.6' | |
setup-python: true | |
- os: ubuntu-20.04 | |
python-version: '3.7' | |
setup-python: true | |
- os: ubuntu-20.04 | |
python-version: '3.8' | |
- os: ubuntu-20.04 | |
python-version: '3.9' | |
setup-python: true | |
- os: ubuntu-22.04 | |
python-version: '3.10' | |
- os: ubuntu-22.04 | |
python-version: '3.11' | |
setup-python: true | |
- os: ubuntu-24.04 | |
python-version: '3.12' | |
- os: ubuntu-24.04 | |
python-version: '3.13' | |
setup-python: true | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Python | |
if: ${{ matrix.setup-python }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Configure PATH to use preinstalled Python 2.7 | |
if: ${{ startsWith(matrix.os, 'macos') && matrix.python-version == '2.7' }} | |
run: | | |
echo '/Library/Frameworks/Python.framework/Versions/2.7/bin' >> $GITHUB_PATH | |
- name: Assert Python version | |
run: | | |
python -c 'import sys | |
assert "%d.%d" % sys.version_info[:2] == "${{ matrix.python-version }}", sys.version' | |
- name: Install readline | |
if: ${{ matrix.os == 'ubuntu-24.04' }} | |
env: | |
DEBIAN_FRONTEND: noninteractive | |
run: | | |
sudo apt-get install -y libreadline-dev | |
- name: Install test runner | |
env: | |
PIP_BREAK_SYSTEM_PACKAGES: true | |
run: | | |
pip install pytest-cov | |
- name: Run tests | |
run: | | |
pytest --cov -- test | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
version: v0.7.3 |