Rationalize testing and fix travis

Test for couple (python version, django version) found in Debian, Ubuntu
and RHEL and if not done, for every supported Django version with the last
version of python

Configure tox to use the locally available python3 then called without parameters
This commit is contained in:
Valentin Samir 2021-06-19 17:21:48 +02:00
parent aeb794fe74
commit 968f4a591f
3 changed files with 171 additions and 165 deletions

View file

@ -1,71 +1,61 @@
language: python
matrix:
include:
# generic checks
- python: "3.9"
env: TOX_ENV=flake8
- python: "3.9"
env: TOX_ENV=check_rst
- python: "3.9"
env: TOX_ENV=coverage
# Python 2 support. Not officialy supported but nice to known
# then it will break
- python: "2.7"
env: TOX_ENV=py27-django111
- python: "2.7"
env: TOX_ENV=py27-django111
arch: ppc64le
# Debian strech support
- python: "3.5"
env: TOX_ENV=py35-django111
- python: "3.5"
env: TOX_ENV=py35-django111
arch: ppc64le
# Ubuntu bionic and EPEL 7 support
- python: "3.6"
env: TOX_ENV=py36-django111
- python: "3.6"
env: TOX_ENV=py36-django111
arch: ppc64le
# RHEL 8 support
- python: "3.6"
env: TOX_ENV=py36-django22
- python: "3.6"
env: TOX_ENV=py36-django22
arch: ppc64le
# Debian buster support
- python: "3.7"
env: TOX_ENV=py37-django22
env: TOX_ENV=py37-django111
- python: "3.7"
env: TOX_ENV=py37-django111
arch: ppc64le
# Ubuntu focal and Ubuntu groovy support
- python: "3.8"
env: TOX_ENV=py38-django22
- python: "3.8"
env: TOX_ENV=py38-django30
- python: "3.8"
env: TOX_ENV=py38-django31
env: TOX_ENV=py38-django22
arch: ppc64le
# Debian bullseye and Ubuntu hirsute support
- python: "3.9"
env: TOX_ENV=py39-django22
- python: "3.9"
env: TOX_ENV=py39-django30
env: TOX_ENV=py39-django22
arch: ppc64le
# Django additional supported version
- python: "3.9"
env: TOX_ENV=py39-django31
- python: "3.9"
env: TOX_ENV=coverage
- python: "3.8"
env: TOX_ENV=flake8
arch: ppc64le
- python: "3.8"
env: TOX_ENV=check_rst
arch: ppc64le
- python: "2.7"
env: TOX_ENV=py27-django111
arch: ppc64le
- python: "3.5"
env: TOX_ENV=py35-django111
arch: ppc64le
- python: "3.6"
env: TOX_ENV=py36-django111
arch: ppc64le
- python: "3.5"
env: TOX_ENV=py35-django20
arch: ppc64le
- python: "3.6"
env: TOX_ENV=py36-django20
arch: ppc64le
- python: "3.5"
env: TOX_ENV=py35-django21
arch: ppc64le
- python: "3.6"
env: TOX_ENV=py36-django21
arch: ppc64le
- python: "3.7"
env: TOX_ENV=py37-django22
arch: ppc64le
- python: "3.8"
env: TOX_ENV=py38-django22
arch: ppc64le
- python: "3.8"
env: TOX_ENV=py38-django30
arch: ppc64le
- python: "3.8"
env: TOX_ENV=coverage
arch: ppc64le
env: TOX_ENV=py39-django32
cache:
directories:

View file

@ -1,15 +1,15 @@
.PHONY: build dist docs
VERSION=`python setup.py -V`
VERSION=`python3 setup.py -V`
build:
python setup.py build
python3 setup.py build
install: dist
pip -V
pip install --no-cache-dir --no-deps --upgrade --force-reinstall --find-links ./dist/django-cas-server-${VERSION}.tar.gz django-cas-server
pip3 -V
pip3 install --no-cache-dir --no-deps --upgrade --force-reinstall --find-links ./dist/django-cas-server-${VERSION}.tar.gz django-cas-server
uninstall:
pip uninstall django-cas-server || true
pip3 uninstall django-cas-server || true
clean_pyc:
find ./ -name '*.pyc' -delete
@ -34,11 +34,11 @@ clean: clean_pyc clean_build clean_coverage clean_tild_backup
clean_all: clean clean_tox clean_test_venv clean_docs clean_eggs
dist:
python setup.py sdist
python3 setup.py sdist
test_venv/bin/python:
python3 -m venv test_venv
test_venv/bin/pip install -U --requirement requirements-dev.txt 'Django>=2.0,<2.1'
test_venv/bin/pip install -U --requirement requirements-dev.txt 'Django>=3.2,<3.3'
test_venv/cas/manage.py: test_venv
mkdir -p test_venv/cas
@ -61,7 +61,7 @@ run_server: test_project
test_venv/bin/python test_venv/cas/manage.py runserver
run_tests: test_venv
python setup.py check --restructuredtext --stric
python3 setup.py check --restructuredtext --stric
test_venv/bin/py.test -rw -x --cov=cas_server --cov-report html --cov-report term
rm htmlcov/coverage_html.js # I am really pissed off by those keybord shortcuts
@ -72,4 +72,4 @@ docs: test_venv/bin/sphinx-build
bash -c "source test_venv/bin/activate; cd docs; make html"
publish_pypi_release:
python setup.py sdist bdist_wheel upload --sign
python3 setup.py sdist bdist_wheel upload --sign

238
tox.ini
View file

@ -3,21 +3,14 @@ envlist=
flake8,
check_rst,
py27-django111,
py35-django111,
py36-django111,
py37-django111,
py36-django22,
py37-django22,
py38-django22,
py39-django22,
py36-django30,
py37-django30,
py38-django30,
py39-django30,
py36-django31,
py37-django31,
py38-django31,
py39-django31,
py3-django111,
py3-django22,
py3-django31,
py3-django32,
##################
# generic config #
##################
[flake8]
max-line-length=100
@ -43,102 +36,9 @@ commands=
{[post_cmd]commands}
whitelist_externals={[post_cmd]whitelist_externals}
[testenv:py27-django111]
basepython=python2.7
deps =
Django>=1.11,<1.12
{[base]deps}
[testenv:py35-django111]
basepython=python3.5
deps =
Django>=1.11,<1.12
{[base]deps}
[testenv:py36-django111]
basepython=python3.6
deps =
Django>=1.11,<1.12
{[base]deps}
[testenv:py37-django111]
basepython=python3.7
deps =
Django>=1.11,<1.12
{[base]deps}
[testenv:py36-django22]
basepython=python3.6
deps =
Django>=2.2,<3.0
{[base]deps}
[testenv:py37-django22]
basepython=python3.7
deps =
Django>=2.2,<3.0
{[base]deps}
[testenv:py38-django22]
basepython=python3.8
deps =
Django>=2.2,<3.0
{[base]deps}
[testenv:py39-django22]
basepython=python3.9
deps =
Django>=2.2,<3.0
{[base]deps}
[testenv:py36-django30]
basepython=python3.6
deps =
Django>=3.0,<3.1
{[base]deps}
[testenv:py37-django30]
basepython=python3.7
deps =
Django>=3.0,<3.1
{[base]deps}
[testenv:py38-django30]
basepython=python3.8
deps =
Django>=3.0,<3.1
{[base]deps}
[testenv:py39-django30]
basepython=python3.9
deps =
Django>=3.0,<3.1
{[base]deps}
[testenv:py36-django31]
basepython=python3.6
deps =
Django>=3.1,<3.2
{[base]deps}
[testenv:py37-django31]
basepython=python3.7
deps =
Django>=3.1,<3.2
{[base]deps}
[testenv:py38-django31]
basepython=python3.8
deps =
Django>=3.1,<3.2
{[base]deps}
[testenv:py39-django31]
basepython=python3.9
deps =
Django>=3.1,<3.2
{[base]deps}
###################
# genercic checks #
###################
[testenv:flake8]
basepython=python3
@ -177,3 +77,119 @@ commands=
{toxinidir}/.update_coverage "{toxinidir}" "django-cas-server"
{[post_cmd]commands}
whitelist_externals={[post_cmd]whitelist_externals}
####################
# Python 2 support #
####################
[testenv:py27-django111]
basepython=python2.7
deps =
Django>=1.11,<1.12
{[base]deps}
##################################
# Generic Python 3 for local use #
##################################
[testenv:py3-django111]
basepython=python3
deps =
Django>=1.11,<1.12
{[base]deps}
[testenv:py3-django22]
basepython=python3
deps =
Django>=2.2,<2.3
{[base]deps}
[testenv:py3-django31]
basepython=python3
deps =
Django>=3.1,<3.2
{[base]deps}
[testenv:py3-django32]
basepython=python3
deps =
Django>=3.2,<3.3
{[base]deps}
#########################
# Debian strech support #
#########################
[testenv:py35-django111]
basepython=python3.5
deps =
Django>=1.11,<1.12
{[base]deps}
####################################
# Ubuntu bionic and EPEL 7 support #
####################################
[testenv:py36-django111]
basepython=python3.6
deps =
Django>=1.11,<1.12
{[base]deps}
##################
# RHEL 8 support #
##################
[testenv:py36-django22]
basepython=python3.6
deps =
Django>=2.2,<3.0
{[base]deps}
#########################
# Debian buster support #
#########################
[testenv:py37-django111]
basepython=python3.7
deps =
Django>=1.11,<1.12
{[base]deps}
##########################################
# Ubuntu focal and Ubuntu groovy support #
##########################################
[testenv:py38-django22]
basepython=python3.8
deps =
Django>=2.2,<3.0
{[base]deps}
##############################################
# Debian bullseye and Ubuntu hirsute support #
##############################################
[testenv:py39-django22]
basepython=python3.9
deps =
Django>=2.2,<3.0
{[base]deps}
#######################################
# Django additional supported version #
#######################################
[testenv:py39-django31]
basepython=python3.9
deps =
Django>=3.1,<3.2
{[base]deps}
[testenv:py39-django32]
basepython=python3.9
deps =
Django>=3.2,<3.3
{[base]deps}