# Test workflow (django/django-localflavor)

> The Test workflow from django/django-localflavor, explained and optimized by Latchkey.

Source: https://latchkey.dev/workflows/django-django-localflavor-test  
Upstream: [django/django-localflavor](https://github.com/django/django-localflavor/blob/master/.github/workflows/test.yml) (.github/workflows/test.yml), licence BSD-3-Clause

## What it does

This is the Test workflow from the django/django-localflavor repository, a real project running GitHub Actions. It is shown here with attribution under its BSD-3-Clause license.

Below, Latchkey shows a faster, safer version produced by its optimization engine.

## The workflow

```yaml
name: Test

on:
  push:
    branches:
      - master
  pull_request:

jobs:
  docs:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v6
      - name: Set up Python
        uses: actions/setup-python@v6
        with:
          python-version: '3.13'
          architecture: x64
      - name: Install tox
        run: |
          python -m pip install --upgrade pip
          python -m pip install --upgrade 'tox>=4.0'
      - name: Run docs test build
        run: tox -e docs

  lint:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v6
      - name: Set up Python
        uses: actions/setup-python@v6
        with:
          python-version: '3.13'
          architecture: x64
      - name: Install tox
        run: |
          python -m pip install --upgrade pip
          python -m pip install --upgrade 'tox>=4.0'
      - name: Run prospector linting
        run: tox -e prospector

  test:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        python-version:
          - '3.9'
          - '3.10'
          - '3.11'
          - '3.12'
          - '3.13'
          - '3.14'
    name: Python ${{ matrix.python-version }}
    steps:
      - uses: actions/checkout@v6
      - name: Set up Python
        uses: actions/setup-python@v6
        with:
          python-version: ${{ matrix.python-version }}
          architecture: x64
      - name: Install tox
        run: |
          python -m pip install --upgrade pip
          python -m pip install --upgrade 'tox>=4.0'
      - name: Run tests
        run: tox run -f py$(echo ${{ matrix.python-version }} | tr -d .)
```

## FAQ

### What does the Test workflow (django/django-localflavor) workflow do?

This is the Test workflow from the django/django-localflavor repository, a real project running GitHub Actions. It is shown here with attribution under its BSD-3-Clause license.

### What CI health grade does this workflow get?

This Python workflow grades D. Paste your own workflow into the Latchkey grader to see its grade and the exact fixes.

### How can I improve this Python workflow?

Add run de-duplication, caching, and job timeouts. Latchkey applies these automatically on managed runners when you point runs-on at Latchkey.

---

Latchkey runs CI/CD that repairs its own failures. Agent entry points: https://latchkey.dev/agent.txt, https://latchkey.dev/openapi.json, https://latchkey.dev/llms.txt
