Skip to content

Commit

Permalink
Simplify CI and update supported versions
Browse files Browse the repository at this point in the history
  • Loading branch information
RealOrangeOne committed May 20, 2024
1 parent 406b66c commit 32c9198
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 217 deletions.
170 changes: 24 additions & 146 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,177 +3,55 @@ name: Test
on: [push]

jobs:
lint:
strategy:
matrix:
toxenv: [isort, flake8, black]

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Set up Python 3
uses: actions/setup-python@v2
with:
python-version: 3

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tox
- name: Run tox - ${{ matrix.toxenv }}
env:
TOXENV: ${{ matrix.toxenv }}
run: tox

test:
continue-on-error: ${{ matrix.experimental }}
strategy:
fail-fast: false
matrix:
python-version: [3.5, 3.6, 3.7, 3.8, 3.9, "3.10"]
django-version: [18, 19, 110, 111, 20, 21, 22, 30, 31, 32, 40, main]
experimental: [false]

# Allow failures on Django main branch test.
include:
- python-version: "3.10"
django-version: main
experimental: true

python-version: ["3.8", "3.9", "3.10", "3.11"]
django-version: ["3.2", "4.1", "4.2", "5.0"]
exclude:
# Python 3.5
- python-version: 3.5
django-version: 30
- python-version: 3.5
django-version: 31
- python-version: 3.5
django-version: 32
- python-version: 3.5
django-version: 40
- python-version: 3.5
django-version: main

# Python 3.6
- python-version: 3.6
django-version: 18
- python-version: 3.6
django-version: 19
- python-version: 3.6
django-version: 110
- python-version: 3.6
django-version: 40
- python-version: 3.6
django-version: main

# Python 3.7
- python-version: 3.7
django-version: 18
- python-version: 3.7
django-version: 19
- python-version: 3.7
django-version: 110
- python-version: 3.7
django-version: 111
- python-version: 3.7
django-version: 40
- python-version: 3.7
django-version: main


# Python 3.8
- python-version: 3.8
django-version: 18
- python-version: 3.8
django-version: 19
- python-version: 3.8
django-version: 110
- python-version: 3.8
django-version: 111
- python-version: 3.8
django-version: 111
- python-version: 3.8
django-version: 20
- python-version: 3.8
django-version: 21
- python-version: 3.8
django-version: main

# Python 3.9
- python-version: "3.9"
django-version: 18
- python-version: "3.9"
django-version: 19
- python-version: "3.9"
django-version: 110
- python-version: "3.9"
django-version: 111
- python-version: "3.9"
django-version: 111
- python-version: "3.9"
django-version: 20
- python-version: "3.9"
django-version: 21
- python-version: "3.9"
django-version: main

# Python 3.10
- python-version: "3.10"
django-version: 18
- python-version: "3.10"
django-version: 19
- python-version: "3.10"
django-version: 110
- python-version: "3.10"
django-version: 111
- python-version: "3.10"
django-version: 111
- python-version: "3.10"
django-version: 20
- python-version: "3.10"
django-version: 21
- python-version: "3.10"
django-version: 21
- python-version: "3.10"
django-version: 22
- python-version: "3.10"
django-version: 30
- python-version: "3.10"
django-version: 31
- python-version: "3.10"
django-version: main

- django-version: "5.0"
python-version: "3.8"
- django-version: "5.0"
python-version: "3.9"

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tox
pip install '.[lint]'
pip install Django~=${{ matrix.django-version }}
- name: Run tests
run: python3 run_tests.py

- name: Run flake8
run: flake8 baipw

- name: Run isort
run: isort --check-only --diff baipw

- name: Run tox - Python ${{ matrix.python-version}}, Django ${{ matrix.django-version }}
env:
TOXENV: py-dj${{ matrix.django-version }}
run: tox
- name: Run isort
run: black --check --diff ./

build:
continue-on-error: true
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Set up Python 3
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: 3

Expand Down
31 changes: 13 additions & 18 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,16 @@ classifiers =
Development Status :: 5 - Production/Stable
License :: OSI Approved
License :: OSI Approved :: BSD License
Programming Language :: Python :: 3.4
Programming Language :: Python :: 3.5
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11
Topic :: Internet :: WWW/HTTP
Framework :: Django
Framework :: Django :: 1.8
Framework :: Django :: 1.9
Framework :: Django :: 1.10
Framework :: Django :: 1.11
Framework :: Django :: 2.0
Framework :: Django :: 2.1
Framework :: Django :: 2.2
Framework :: Django :: 3.0
Framework :: Django :: 3.1
Framework :: Django :: 3.2
Framework :: Django :: 4.1
Framework :: Django :: 4.2
Framework :: Django :: 5.0
keywords =
django
basic
Expand All @@ -40,14 +35,14 @@ keywords =
[options]
packages = find:
install_requires =
Django>=1.8,<5
python_requires = >=3.4
Django>=3.2
python_requires = >=3.8

[options.extras_require]
lint =
isort==5.7.0
flake8==3.8.4
black==20.8b1
isort==5.13.2
flake8==7.0.0
black==24.4.2

[options.packages.find]
exclude =
Expand Down
53 changes: 0 additions & 53 deletions tox.ini

This file was deleted.

0 comments on commit 32c9198

Please sign in to comment.