Skip to content

Tests

Tests #986

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.7", "3.8", "3.9", "3.10", "pypy-3.8"]
os: [ubuntu-latest, macos-latest]
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v3
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@v3
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@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: "3.8"
- name: Install tox
run: pip install tox
- name: Run tox
run: tox -e ${{ matrix.tox_env }}