Update badges as per Wagtail Python Package Maintenance Guidelines #73
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: Test & Lint | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
workflow_call: # Allow for the publish workflows to run the tests by calling this workflow | |
jobs: | |
test: | |
name: Python ${{ matrix.python}} ${{ matrix.toxenv }} | |
runs-on: ubuntu-latest | |
continue-on-error: ${{ matrix.experimental }} | |
strategy: | |
matrix: | |
python: ["3.8", "3.9", "3.10", "3.11"] | |
experimental: [false] | |
toxenv: ["py"] | |
include: | |
# Linting | |
- python: "3.8" | |
toxenv: flake8 | |
experimental: false | |
- python: "3.8" | |
toxenv: isort | |
experimental: false | |
# Future Wagtail release from main branch (allowed to fail) | |
- python: "3.11" | |
toxenv: wagtailmain | |
experimental: true | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python }} | |
- name: Install dependencies | |
run: | | |
python -m pip install tox tox-py | |
# This step runs only for jobs NOT in the include matrix | |
- name: Run tox targets for Python ${{ matrix.python }} | |
if: ${{ matrix.toxenv == 'py' }} | |
run: | | |
tox --py current | |
# This step runs only for jobs in the include matrix and covers linting | |
- name: Run tox targets for Python ${{ matrix.python }} (${{ matrix.toxenv }}) | |
if: ${{ matrix.toxenv != 'py' }} | |
run: | | |
tox -e ${{ matrix.toxenv }} | |
env: | |
TOXENV: ${{ matrix.toxenv }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |