| 1 |
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions |
| 2 |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions |
| 3 |
|
| 4 |
name: Test Matrix |
| 5 |
|
| 6 |
on: |
| 7 |
push: |
| 8 |
branches: [ master ] |
| 9 |
pull_request: |
| 10 |
branches: [ master ] |
| 11 |
|
| 12 |
jobs: |
| 13 |
build: |
| 14 |
runs-on: ubuntu-24.04 # TODO: update to ubuntu-latest when django drops python 3.6 |
| 15 |
strategy: |
| 16 |
fail-fast: false |
| 17 |
matrix: |
| 18 |
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] |
| 19 |
django-version: ["4.2", "5.0", "5.1", "5.2"] # Todo: add "dev" back |
| 20 |
exclude: |
| 21 |
- python-version: "3.8" |
| 22 |
django-version: "5.0" |
| 23 |
- python-version: "3.8" |
| 24 |
django-version: "5.1" |
| 25 |
- python-version: "3.8" |
| 26 |
django-version: "5.2" |
| 27 |
- python-version: "3.9" |
| 28 |
django-version: "5.0" |
| 29 |
- python-version: "3.9" |
| 30 |
django-version: "5.1" |
| 31 |
- python-version: "3.9" |
| 32 |
django-version: "5.2" |
| 33 |
# - python-version: "3.6" |
| 34 |
# django-version: "dev" |
| 35 |
# - python-version: "3.7" |
| 36 |
# django-version: "dev" |
| 37 |
|
| 38 |
steps: |
| 39 |
- uses: actions/checkout@v4 |
| 40 |
- name: Install OS dependencies |
| 41 |
run: | |
| 42 |
sudo apt install -y binutils libproj-dev gdal-bin libsqlite3-mod-spatialite |
| 43 |
|
| 44 |
- name: Set up Python ${{ matrix.python-version }} |
| 45 |
uses: actions/setup-python@v5 |
| 46 |
with: |
| 47 |
python-version: ${{ matrix.python-version }} |
| 48 |
- name: Install dependencies |
| 49 |
run: | |
| 50 |
python -m pip install --upgrade pip wheel virtualenv tox coveralls |
| 51 |
- name: Erase cached coverage |
| 52 |
run: | |
| 53 |
coverage erase |
| 54 |
- name: Flake8 |
| 55 |
run: | |
| 56 |
tox -e py${{matrix.python-version}}-flake8 |
| 57 |
- name: Docs |
| 58 |
run: | |
| 59 |
tox -e py${{matrix.python-version}}-docs |
| 60 |
- name: Test with Tox |
| 61 |
run: | |
| 62 |
tox -e py${{matrix.python-version}}-dj${{matrix.django-version}} |
| 63 |
- name: Upload coverage data to coveralls.io |
| 64 |
run: coveralls --service=github |
| 65 |
continue-on-error: true |
| 66 |
env: |
| 67 |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 68 |
|