Skip to content

Migrate setup.cfg to pyproject.toml #535

Migrate setup.cfg to pyproject.toml

Migrate setup.cfg to pyproject.toml #535

Workflow file for this run

name: Python package
on: [pull_request]
jobs:
tests:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version: ["3.7", "3.8", "pypy3.8"]
os: ["ubuntu-22.04", "windows-2022", "macos-11"]
tzdata_extras: ["", "tzdata"]
include:
- { python-version: "3.6", os: "windows-2019", tzdata_extras: "" }
- { python-version: "3.6", os: "windows-2019", tzdata_extras: "tzdata" }
- { python-version: "3.6", os: "macos-10.15", tzdata_extras: "" }
- { python-version: "3.6", os: "macos-10.15", tzdata_extras: "tzdata" }
- { python-version: "3.6", os: "ubuntu-20.04", tzdata_extras: "" }
- { python-version: "3.6", os: "ubuntu-20.04", tzdata_extras: "tzdata" }
env:
TOXENV: py
TEST_EXTRAS_TOX: ${{ matrix.tzdata_extras }}
steps:
- uses: actions/checkout@v3
- name: ${{ matrix.python-version }} - ${{ matrix.os }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip 'tox>=3.18'
- name: Run tests
run: |
python -m tox
c_coverage:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version: ["3.7", "3.8"]
os: ["ubuntu-22.04"]
include:
- { python-version: "3.6", os: "ubuntu-20.04" }
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
steps:
- uses: actions/checkout@v3
- name: C coverage - ${{ matrix.os }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip 'tox>=3.18'
- name: Run tests
run: |
tox -e gcov
build:
runs-on: "ubuntu-latest"
strategy:
fail-fast: false
matrix:
cc: ["gcc", "clang"]
env:
CC: ${{ matrix.cc }}
CFLAGS: >
-Wall
-Werror
-Wextra
-Wno-unused-result
-Wno-unused-parameter
-Wno-missing-field-initializers
steps:
- uses: actions/checkout@v3
- name: ${{ matrix.toxenv }}
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Install tox
run: python -m pip install --upgrade pip 'tox>=3.18'
- name: Build
run: tox -e build,build-check
other:
runs-on: "ubuntu-latest"
strategy:
fail-fast: false
matrix:
toxenv: ["lint", "docs", "mypy"]
env:
TOXENV: ${{ matrix.toxenv }}
steps:
- uses: actions/checkout@v3
- name: ${{ matrix.toxenv }}
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Install tox
run: python -m pip install --upgrade pip 'tox>=4.0'
- name: Run action
run: |
if [[ $TOXENV == "build" ]]; then
CFLAGS=""
CFLAGS+=" -Wall"
CFLAGS+=" -Werror"
CFLAGS+=" -Wextra"
CFLAGS+=" -Wno-unused-result"
CFLAGS+=" -Wno-unused-parameter"
CFLAGS+=" -Wno-missing-field-initializers"
export CFLAGS="${CFLAGS}"
TOXENV="build,build-check"
fi
if [[ $TOXENV == "docs" ]]; then
tox -- -j auto -bhtml -W -n -a --keep-going
else
tox
fi