Skip to content

Stop tox running in parallel #124

Stop tox running in parallel

Stop tox running in parallel #124

Workflow file for this run

name: Tests
on:
push:
branches: [main]
pull_request:
branches: [main]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
test:
name: "Python ${{ matrix.python-version }}, Django ${{ matrix.django-version}}"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
django-version: ["4.2", "5.1", "main"]
exclude:
- python-version: "3.13"
django-version: "4.2"
- python-version: "3.9"
django-version: "5.1"
- python-version: "3.9"
django-version: "main"
steps:
- name: Git clone
uses: actions/checkout@v4
- name: Install uv and set Python version
uses: astral-sh/setup-uv@v5
with:
# enable-cache: false
# cache-dependency-glob: "uv.lock"
python-version: ${{ matrix.python-version }}
- name: Sync uv
run: uv sync --dev
- name: Test with Tox
run: uv run --with tox --with tox-uv --with tox-gh-actions --with 'django~=${{ matrix.django-version }}.0' tox
env:
DJANGO: ${{ matrix.django-version }}
- name: Upload Coverage to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
ruff:
name: Run ruff
runs-on: ubuntu-latest
steps:
- name: Git clone
uses: actions/checkout@v4
- name: Install uv and set Python version
uses: astral-sh/setup-uv@v5
with:
python-version: "3.12"
- name: Install dependencies
run: uv pip install ruff tox tox-gh-actions tox-uv
- name: Run ruff
run: tox -e ruff
slack:
# https://github.com/8398a7/action-slack/issues/72#issuecomment-649910353
name: Slack notification
runs-on: ubuntu-latest
needs: [test, ruff]
# this is required, otherwise it gets skipped if any needed jobs fail.
# https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idneeds
if: always() # Pick up events even if the job fails or is cancelled.
steps:
- uses: technote-space/workflow-conclusion-action@v3
- name: Send Slack notification
uses: 8398a7/action-slack@v3
with:
status: ${{ job.status }}
# fields: repo,message,commit,author,action,eventName,ref,workflow,job,took # selectable (default: repo,message)
fields: repo,message,commit,author,action
env:
SLACK_WEBHOOK_URL: ${{ secrets.ACTIONS_CI_SLACK_HOOK }}