CI #71
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 | |
permissions: | |
contents: read | |
on: | |
push: | |
branches: | |
- master | |
- main | |
- v*.x | |
pull_request: | |
branches: | |
- master | |
- main | |
- v*.x | |
schedule: | |
# every Monday | |
- cron: '30 4 * * 1' | |
workflow_dispatch: | |
jobs: | |
tests: | |
name: "Python ${{ matrix.python-version }} on ${{ matrix.image }}" | |
runs-on: "${{ matrix.image }}" | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: | |
- "3.7" | |
- "3.8" | |
- "3.9" | |
- "3.10" | |
- "3.11" | |
- "3.12" | |
image: | |
- "ubuntu-22.04" | |
include: | |
- python-version: "3.6" | |
image: "ubuntu-20.04" | |
steps: | |
- uses: "actions/checkout@v4" | |
- uses: "actions/setup-python@v4" | |
with: | |
python-version: "${{ matrix.python-version }}" | |
allow-prereleases: true | |
- name: "Update pip" | |
run: python -m pip install --upgrade pip setuptools wheel | |
- name: "Install tox dependencies" | |
run: python -m pip install --upgrade tox tox-gh-actions | |
- name: "Run tox for ${{ matrix.python-version }}" | |
run: "python -m tox" | |
lint: | |
name: "Linting" | |
runs-on: "ubuntu-22.04" | |
steps: | |
- uses: "actions/checkout@v4" | |
- uses: "actions/setup-python@v4" | |
with: | |
python-version: "3.11" | |
- name: "Update pip" | |
run: python -m pip install --upgrade pip setuptools wheel | |
- name: "Install tox dependencies" | |
run: python -m pip install --upgrade tox | |
- name: "Run tox for lint" | |
run: "python -m tox -e black,doc,pep8py3" |