fix: Switch to pyproject.toml
based builds
#1191
Workflow file for this run
This file contains hidden or 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: Python Unit CI | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
permissions: | |
contents: read | |
jobs: | |
test: | |
strategy: | |
matrix: | |
python: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12'] | |
platform: [ubuntu-latest, macos-latest, windows-latest] | |
# Python <= 3.9 is not available on macos-latest | |
# Workaround for https://github.com/actions/setup-python/issues/696 | |
# Python <= 3.8 is not available on ubuntu-latest | |
exclude: | |
- platform: macos-latest | |
python: '3.9' | |
- platform: macos-latest | |
python: '3.8' | |
- platform: macos-latest | |
python: '3.7' | |
- platform: ubuntu-latest | |
python: '3.8' | |
- platform: ubuntu-latest | |
python: '3.7' | |
include: | |
- platform: macos-latest | |
python: '3.9' | |
- platform: macos-13 | |
python: '3.8' | |
- platform: macos-13 | |
python: '3.7' | |
- platform: ubuntu-22.04 | |
python: '3.8' | |
- platform: ubuntu-22.04 | |
python: '3.7' | |
runs-on: ${{ matrix.platform }} | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1 | |
with: | |
disable-sudo: true | |
egress-policy: block | |
allowed-endpoints: > | |
auth.docker.io:443 | |
files.pythonhosted.org:443 | |
api.github.com:443 | |
github.com:443 | |
objects.githubusercontent.com:443 | |
production.cloudflare.docker.com:443 | |
pypi.org:443 | |
registry-1.docker.io:443 | |
- name: Checkout | |
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0 | |
- name: Use Python ${{ matrix.python }} | |
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0 | |
with: | |
python-version: ${{ matrix.python }} | |
- name: Install tox | |
run: python -m pip install tox | |
- name: Test | |
run: python -m tox -e py-${{ matrix.platform }} |