Skip to content

add github actions test workflow #2

add github actions test workflow

add github actions test workflow #2

Workflow file for this run

name: test
on:
push:
branches: [main]
pull_request:
concurrency:
group: test-${{ github.head_ref }}
cancel-in-progress: true
env:
PYTHONUNBUFFERED: "1"
FORCE_COLOR: "1"
jobs:
test:
name: Python ${{ matrix.python-version }}, Django ${{ matrix.django-version }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
django-version: ["4.2", "5.0"]
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: westerveltco/setup-ci-action@v0
with:
python-version: ${{ matrix.python-version }}
extra-python-dependencies: tox,tox-gh-actions
use-uv: true
- name: Run test suite
run: tox -v
env:
DJANGO: ${{ matrix.django-version }}
tests:
runs-on: ubuntu-latest
needs: test
if: always()
steps:
- name: OK
if: ${{ !(contains(needs.*.result, 'failure')) }}
run: exit 0
- name: Fail
if: ${{ contains(needs.*.result, 'failure') }}
run: exit 1