Skip to content

Commit

Permalink
tests config
Browse files Browse the repository at this point in the history
  • Loading branch information
pefremova committed Jun 8, 2024
1 parent a66eec8 commit 443dcaa
Showing 1 changed file with 112 additions and 0 deletions.
112 changes: 112 additions & 0 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
# 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: Python package

on:
push:
branches: [ "master", "actions" ]
pull_request:
branches: [ "master" ]

jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- name: Python 3.8 / Django 3.2
python-version: "3.8"
django-version: ">=3.2,<3.3"

- name: Python 3.9 / Django 3.2
python-version: "3.9"
django-version: ">=3.2,<3.3"

- name: Python 3.10 / Django 3.2
python-version: "3.10"
django-version: ">=3.2.9,<3.3"

- name: Python 3.8 / Django 4.0
python-version: "3.8"
django-version: ">=4.0,<4.1"

- name: Python 3.9 / Django 4.0
python-version: "3.9"
django-version: ">=4.0,<4.1"

- name: Python 3.10 / Django 4.0
python-version: "3.10"
django-version: ">=4.0,<4.1"

- name: Python 3.8 / Django 4.1
python-version: "3.8"
django-version: ">=4.1,<4.2"

- name: Python 3.9 / Django 4.1
python-version: "3.9"
django-version: ">=4.1,<4.2"

- name: Python 3.10 / Django 4.1
python-version: "3.10"
django-version: ">=4.1,<4.2"

- name: Python 3.11 / Django 4.1
python-version: "3.11"
django-version: ">=4.1.3,<4.2"

- name: Python 3.8 / Django 4.2
python-version: "3.8"
django-version: ">=4.2,<4.3"

- name: Python 3.9 / Django 4.2
python-version: "3.9"
django-version: ">=4.2,<4.3"

- name: Python 3.10 / Django 4.2
python-version: "3.10"
django-version: ">=4.2,<4.3"

- name: Python 3.11 / Django 4.2
python-version: "3.11"
django-version: ">=4.2,<4.3"

- name: Python 3.12 / Django 4.2
python-version: "3.12"
django-version: ">=4.2.8,<4.3"

- name: Python 3.10 / Django 5.0
python-version: "3.10"
django-version: ">=5.0,<5.1"

- name: Python 3.11 / Django 5.0
python-version: "3.11"
django-version: ">=5.0,<5.1"

- name: Python 3.12 / Django 5.0
python-version: "3.12"
django-version: ">=5.0,<5.1"

steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5.1.0
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -e .
python -m pip install "Django${{ matrix.django-version }}" coverage
python -m pip install -r tests/requirements.pip
- name: Run Tests
run: |
coverage run manage.py test tests
- name: Generate coverage report
run: |
coverage xml --include "ttoolly/*"
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4.0.1
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

0 comments on commit 443dcaa

Please sign in to comment.