Updated support for more recent versions of Python and Django #26
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: Test | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
tests: | |
name: run tests for python ${{ matrix.python }}, django ${{ matrix.django }}, ${{ matrix.database }} | |
runs-on: ubuntu-latest | |
services: | |
postgres: | |
image: postgres | |
env: | |
POSTGRES_DB: "test" | |
POSTGRES_USER: "test" | |
POSTGRES_PASSWORD: "test" | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
ports: | |
- 5432:5432 | |
strategy: | |
matrix: | |
python: [ "3.8", "3.9", "3.10", "3.11", "3.12" ] | |
django: [ "3.2", "4.1", "4.2", "5.0" ] | |
database: [ "sqlite", "postgres" ] | |
exclude: | |
- python: "3.11" | |
django: "3.2" | |
- python: "3.12" | |
django: "3.2" | |
- python: "3.12" | |
django: "4.1" | |
- python: "3.8" | |
django: "5.0" | |
- python: "3.9" | |
django: "5.0" | |
steps: | |
- name: checkout repository | |
uses: actions/checkout@v4 | |
- name: install python ${{ matrix.python }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python }} | |
- name: install tox | |
run: python3 -m pip install tox tox-gh | |
- name: run tests | |
run: tox -e py${{ matrix.python }}-django${{ matrix.django }}-${{ matrix.database }} | |
lint: | |
name: check for any style errors | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout repository | |
uses: actions/checkout@v4 | |
- name: install python 3.11 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.11" | |
- name: install tox | |
run: python3 -m pip install tox | |
- name: run linter | |
run: tox -e flake8 |