Skip to content

Commit

Permalink
test setup
Browse files Browse the repository at this point in the history
  • Loading branch information
erikvw committed Dec 14, 2023
1 parent b5e1205 commit b3ba1f1
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 23 deletions.
22 changes: 13 additions & 9 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,14 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ['3.11']
django-version: ['4.2', 'dev']
python-version: ['3.11', '3.12']
django-version: ['4.2', '5.0', 'dev']

exclude:
- python-version: '3.12'
django-version: '4.2'
- python-version: '3.11'
django-version: 'dev'
services:
mysql:
image: mysql:latest
Expand All @@ -31,20 +36,19 @@ jobs:
sudo apt-get -y update
sudo apt-get install libcups2-dev wamerican
- uses: actions/checkout@v2

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

- name: Get pip cache dir
id: pip-cache
run: |
echo "::set-output name=dir::$(pip cache dir)"
echo "dir=$(pip cache dir)" >>$GITHUB_OUTPUT
- name: Cache
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ${{ steps.pip-cache.outputs.dir }}
key:
Expand All @@ -64,7 +68,7 @@ jobs:
env:
DJANGO: ${{ matrix.django-version }}

- name: Upload coverage
uses: codecov/codecov-action@v1
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
name: Python ${{ matrix.python-version }}
19 changes: 19 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@

0.3.15
------
- update testing matrix to include DJ50. Drop DJ41.

0.3.14
------
- track the current language of a model instance on save
- add locale created/modified fields to the default set of fields
provided on the mixin

0.3.12
------
- add typing hints

0.3.11
------
- update MANIFEST.in

0.3.10
------
- set up for translations
Expand Down
1 change: 0 additions & 1 deletion VERSION

This file was deleted.

29 changes: 18 additions & 11 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,22 +1,21 @@
[build-system]
requires = ["setuptools>=45", "setuptools_scm[toml]>=6.2"]
build-backend = "setuptools.build_meta"
requires = ["setuptools>=60", "setuptools-scm>=8.0"]

[tool.setuptools_scm]
write_to = "_version.py"
version_file="_version.py"

[tool.black]
line-length = 95
target-version = ["py39"]
target-version = ["py311"]
extend-exclude = '''^(.*\/)*\b(migrations)\b($|\/.*$)'''

[tool.isort]
profile = "black"
py_version = "310"
py_version = "311"
skip = [".tox", ".eggs", "migrations"]

[tool.coverage.run]
parallel = true
parallel = false
branch = true
source = ["django_audit_fields"]

Expand All @@ -27,36 +26,44 @@ source = ["django_audit_fields"]
show_missing = true
skip_covered = true
omit = ["requirements.txt"]
exclude_lines = [
"pragma: no cover",
"if TYPE_CHECKING:",
]

[tool.tox]
legacy_tox_ini = """
[tox]
envlist =
py{311}-dj{42,dev},
py{311}-dj{42,50},
py{312}-dj{50,dev},
lint
isolated_build = true
[gh-actions]
python =
3.11: py311, line
3.11: py311
3.12: py312, lint
[gh-actions:env]
DJANGO =
4.2: dj42
dev: djdev
5.0: dj50
dev: djdev, lint
[testenv]
deps =
-r https://raw.githubusercontent.com/clinicedc/edc/develop/requirements.tests/tox.txt
-r https://raw.githubusercontent.com/clinicedc/edc/develop/requirements.tests/test_utils.txt
-r https://raw.githubusercontent.com/clinicedc/edc/develop/requirements.tests/edc.txt
-r https://raw.githubusercontent.com/clinicedc/edc/develop/requirements.tests/third_party_dev.txt
dj41: Django>=4.2,<5.0
dj42: Django>=4.2,<5.0
dj50: Django>=5.0
djdev: https://github.com/django/django/tarball/main
commands =
pip install -U pip
pip install -U pip coverage[toml]
pip --version
pip freeze
coverage run -a runtests.py
Expand Down
3 changes: 1 addition & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ keywords = django Edc audit field clinicedc, clinical trials
classifiers=
Environment :: Web Environment
Framework :: Django
Framework :: Django :: 4.0
Framework :: Django :: 4.1
Framework :: Django :: 4.2
Intended Audience :: Developers
Intended Audience :: Science/Research
Operating System :: OS Independent
Expand Down

0 comments on commit b3ba1f1

Please sign in to comment.