Skip to content

add github actions test workflow #1

add github actions test workflow

add github actions test workflow #1

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.py }}, Django ${{ matrix.dj }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
py: ["3.8", "3.9", "3.10", "3.11", "3.12"]
dj: ["4.2", "5.0"]
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: westerveltco/setup-ci-action@v0
with:
python-version: ${{ matrix.py }}
extra-python-dependencies: nox
use-uv: true
- name: Install tox
run: python -m pip install tox-gh>=1.2
- name: Setup test suite
run: tox -vv --notest
- name: Run test suite
run: tox --skip-pkg-install
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