Skip to content

add nox and test against different Python and Django versions #265

add nox and test against different Python and Django versions

add nox and test against different Python and Django versions #265

Workflow file for this run

name: test
on:
pull_request:
push:
branches: [main]
workflow_call:
concurrency:
group: test-${{ github.head_ref }}
cancel-in-progress: true
env:
CARGO_TERM_COLOR: always
FORCE_COLOR: "1"
PYTHONUNBUFFERED: "1"
jobs:
generate-matrix:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
pyproject-file: pyproject.toml
- id: set-matrix
run: |
uv run nox --session gha_matrix
test:
name: Python ${{ matrix.python-version }}, Django ${{ matrix.django-version }} (${{ runs-on }})

Check failure on line 37 in .github/workflows/test.yml

View workflow run for this annotation

GitHub Actions / test

Invalid workflow file

The workflow is not valid. .github/workflows/test.yml (Line: 37, Col: 11): Unrecognized named-value: 'runs-on'. Located at position 1 within expression: runs-on
runs-on: ubuntu-latest
needs: generate-matrix
strategy:
fail-fast: false
matrix: ${{ fromJSON(needs.generate-matrix.outputs.matrix) }}
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
pyproject-file: pyproject.toml
- name: Run tests
run: |
uv run nox --session "tests(python='${{ matrix.python-version }}', django='${{ matrix.django-version }}')"