Skip to content

Tests

Tests #1154

Workflow file for this run

name: Tests
on:
pull_request:
branches:
- main
push:
branches:
- main
schedule:
- cron: '07 01 * * *'
jobs:
unit-tests:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "pypy-3.8"]
os: [ubuntu-latest, macos-latest]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install tox
run: pip install tox tox-gh-actions
- name: Run tox
run: tox
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
file: ${{runner.workspace}}/django-sendfile2/examples/protected_downloads/coverage.xml
misc:
runs-on: ubuntu-latest
strategy:
matrix:
tox_env: [lint, isort, docs]
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install tox
run: pip install tox
- name: Run tox
run: tox -e ${{ matrix.tox_env }}