Skip to content

Commit

Permalink
Merge pull request #41 from BrightpathProgress/update-ci
Browse files Browse the repository at this point in the history
Update CI to test against supported Django/Python versions
  • Loading branch information
FlipperPA authored Apr 21, 2024
2 parents 15c7d6e + 2c24198 commit 47262ce
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 29 deletions.
24 changes: 11 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,20 @@ jobs:
fail-fast: false
matrix:
python-version:
- "3.6"
- "3.7"
- "3.8"
- "3.9"
- "pypy-3.6"
- "pypy-3.7"
- "3.10"
- "3.11"
- "3.12"
tox-env:
- "dj22" # LTS
- "dj31"
- "dj32" # LTS
- "dj42" # LTS
- "dj50"
exclude:
# Python 3.9 is compatible with Django 3.1+
# Python 3.8/3.9 is incompatible with Django 5.0+
- python-version: "3.8"
tox-env: "dj50"
- python-version: "3.9"
tox-env: "dj22"
- python-version: "3.9"
tox-env: "dj30"
tox-env: "dj50"

env:
TOXENV: ${{ matrix.tox-env }}
Expand Down Expand Up @@ -66,10 +64,10 @@ jobs:
steps:
- uses: actions/checkout@v2

- name: Set up Python 3.6
- name: Set up Python 3.12
uses: actions/setup-python@v2
with:
python-version: '3.6'
python-version: '3.12'

- name: Install tox and flake8 packages
run: pip install tox tox-gh-actions flake8
Expand Down
5 changes: 1 addition & 4 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,12 @@ Automated code metrics:
.. image:: https://img.shields.io/codeclimate/github/GaretJax/django-click.svg
:target: https://codeclimate.com/github/GaretJax/django-click

.. image:: https://img.shields.io/requires/github/GaretJax/django-click.svg
:target: https://requires.io/github/GaretJax/django-click/requirements/?branch=master

``django-click`` is a library to easily write Django management commands using the
``click`` command line library.

* Free software: MIT license
* Documentation for the Click command line library: https://click.palletsprojects.com/en/8.0.x/
* Compatible with Django 2.2, 3.1, or 3.2 running on Python 3.6, 3.7, 3.8, 3.9, and PyPy.
* Compatible with Django 4.2 and 5.0 running on Python 3.8, 3.9, 3.10, 3.11, and 3.12 (note: 3.10+ required for Django 5.0).


Installation
Expand Down
18 changes: 6 additions & 12 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,28 +1,22 @@
[tox]
# Having the .tox directory in the project directory slows down the
# `pip install -e .` step required by `usedevelop = true` considerably.
# By moving it out of the way (~500MB), we trim test execution time by > 80%.
toxworkdir = {homedir}/.toxenvs/django-click
envlist =
dj{22,31,32},flake8
dj{42,50},flake8

[gh-actions]
django =
2.2: dj22
3.1: dj31
3.2: dj32
4.2: dj42
5.0: dj50

[testenv]
usedevelop = true
package = editable
passenv = LC_ALL, LANG, LC_CTYPE
setenv =
DJANGO_SETTINGS_MODULE=testprj.settings
PYTHONPATH={toxinidir}/djclick/test/testprj
deps =
-rrequirements-test.txt
dj22: django>=2.2,<2.3
dj31: django>=3.1,<3.2
dj32: django>=3.2,<3.3
dj42: django>=4.2,<4.3
dj50: django>=5.0,<5.1
commands = py.test -rxs --cov-report= --cov-append --cov djclick {posargs:djclick}


Expand Down

0 comments on commit 47262ce

Please sign in to comment.