This repository has been archived by the owner on Sep 3, 2024. It is now read-only.
Badges! #10
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python | |
name: Tests | |
on: | |
push: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: true | |
matrix: | |
python-version: ["3.9", "3.10", "3.11", "3.12.0-rc.3"] | |
django-version: [">4.2,<5", "==5.0a1"] | |
exclude: | |
# exclude Django 5 on Python 3.9 | |
- python-version: "3.9" | |
django-version: "==5.0a1" | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v3 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Update Pip | |
run: | | |
python -m pip install --upgrade pip | |
- name: Install dependencies | |
run: | | |
python -m pip install "Django${{ matrix.django-version }}" | |
python -m pip install . | |
python -m pip install -r testing_requirements.txt | |
- name: Lint | |
run: | | |
# stop the build if there are Python syntax errors or undefined names | |
black . --check | |
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide | |
ruff . | |
- name: Test with pytest | |
run: | | |
python run_tests.py |