Modernize all the things! #35
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: CI | |
on: [push, pull_request] | |
jobs: | |
lint: | |
name: Lint with flake8 | |
runs-on: ubuntu-latest | |
steps: | |
- uses: "actions/checkout@v4" | |
- uses: "actions/setup-python@v4" | |
with: | |
python-version: "3.10" | |
- run: | | |
pip install flake8 | |
# stop the build if there are Python syntax errors or undefined names | |
flake8 --count --select=E9,F63,F7,F82 --show-source --statistics src/ | |
tests: | |
name: "Python ${{ matrix.python-version }}" | |
needs: lint | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] | |
steps: | |
- uses: "actions/checkout@v4" | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: "actions/setup-python@v4" | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
set -xe | |
python -VV | |
python -m site | |
python -m pip install --upgrade pip wheel | |
python -m pip install --upgrade virtualenv tox tox-gh-actions | |
- name: Test with tox | |
run: | | |
python -m tox | |
package: | |
name: "Build & verify package" | |
runs-on: "ubuntu-latest" | |
steps: | |
- uses: "actions/checkout@v4" | |
- uses: "actions/setup-python@v4" | |
with: | |
python-version: "3.10" | |
- name: "Install build, check-wheel-content, and twine" | |
run: | | |
python -m pip install build twine check-wheel-contents | |
- name: "Build package" | |
run: "python -m build" | |
- name: "List result" | |
run: "ls -l dist" | |
- name: "Check wheel contents" | |
run: "check-wheel-contents --ignore W004 dist/*.whl" | |
- name: "Check long_description" | |
run: "python -m twine check dist/*" |