Skip to content

Commit

Permalink
add hopefully improved CI parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
CarliJoy committed Nov 28, 2020
1 parent afa3151 commit 689c450
Show file tree
Hide file tree
Showing 3 changed files with 74 additions and 10 deletions.
65 changes: 58 additions & 7 deletions .travis.yml
@@ -1,12 +1,39 @@
os: linux
arch: arm64-graviton2
virt: lxd
dist: focal
group: edge
language: python
sudo: false
cache: pip
cache:
- directories:
- $HOME/.cache/pre-commit
- pip

# Taken from https://github.com/encode/django-rest-framework/blob/master/.travis.yml
matrix:
fast_finish: true
include:

- { python: "3.5", env: DJANGO=2.2 }

- { python: "3.6", env: DJANGO=2.2 }
- { python: "3.6", env: DJANGO=3.0 }
- { python: "3.6", env: DJANGO=3.1 }

- { python: "3.7", env: DJANGO=2.2 }
- { python: "3.7", env: DJANGO=3.0 }
- { python: "3.7", env: DJANGO=3.1 }

- { python: "3.8", env: DJANGO=3.0 }
- { python: "3.8", env: DJANGO=3.1 }

- { python: "3.9", env: DJANGO=3.1 }

env:
# Do not check the most up to date version as it seem to be in compatible with django_nose
# - DJANGO='https://github.com/django/django/archive/master.tar.gz'
- DJANGO='django>=2.2.0,<2.3.0'
- DJANGO='django>=3.0.0,<3.1.0'
- DJANGO='django>=2.2.0,<2.3'
- DJANGO='django>=3.0.0,<3.1'
- DJANGO='django>=3.1.0,<3.2.0'

python:
Expand All @@ -16,8 +43,32 @@ python:
- "3.9"
- "nightly"


stages:
- linting
- test
- deploy

jobs:
include:
- stage: linting
python: "3.9"
install: travis_retry pip install pre-commit
script: pre-commit run --all-files
env: DJANGO="none"
- stage: deploy
provider: pypi
python: "3.9"
env: DJANGO="none"
username: __token__
server: https://upload.pypi.org/legacy/
distributions: sdist bdist_wheel
password:
secure: OwJd2Ikzg/cBbeW0eekMV8aXT/6aOOyf7qi1ow+PvOOTGHzNM3XXvwcwD2TRywBvCEtpBBnGkEnEB8aGEHeF8dITGIVQjTzH0fjPB7ax/3zvg6ok/kY45tv9DpP8cAVxotSXpdgNZ8eHHf4HetWCjAI9tjSxamsC+RyRcINmbpvxrNYRzPLp/5uL5JOPADI98X7zSGRbLKPMSef/hRVeYUyw5TtkzL87/quKlPr2TNl240OQWB/FMxufGie+aLVMpz3eRtZYk5xf8LGxCWb/XPR2J9dmk1DGZSJkoaBUqSveq4NhT8VDL4s4Rl3vTLrPa+rm66crOiqeKgDFP6cXCG2uQpPD4rNtd5fTeGL7ZEdCMHFDqGoFpcHUuZDHprOVXVQ2x0BUI54KR4ntzascxuW5a1jyU5FkKzaUNB+gUW33IyStV0Lalq2Nnm8ASy6JqKJlr3Kj4VX/1QMx1KrwYRM3B9geW2x9DqHaijF75d7ln4zLgiUT6mDy+LeY21M4cUs6nbjzH+XqUG2JFDGhW/SmpSIXE7rEZIYRmUkwcr8jaNI8SRZPSmiE3kSY9C+VRPtR/b/W5m7zMGckSUKscP2tUQEPr5r8Qx+m6yorlgKToNJJ5eAIFnYEuLdA+O8nOSk9hBGSlCZxWicpkd/0qns69MMqPR913MQhslh41jg=
on:
tags: true

install:
- travis_retry pip install tox tox-travis
- travis_retry pip install tox tox-travis

script:
tox
script: tox
2 changes: 2 additions & 0 deletions CHANGELOG.rst
Expand Up @@ -13,6 +13,8 @@ Version 0.4
- pass base_unit from field to widget (`merge request #5 from cornelv`_)
- now using PyScaffold for versioned release
- added documentation and uploaded to readthedocs.org
- using pre-commit (also in CI)
- improved travis ci builds
- Created Changelog file

Version 0.4
Expand Down
17 changes: 14 additions & 3 deletions tox.ini
@@ -1,15 +1,26 @@
[tox]
envlist=py{36,37,38,39}-django{22,30,31}
envlist =
{py35,py36,py37}-django22,
{py36,py37,py38}-django30,
{py36,py37,py38,py39}-django31

[travis:env]
DJANGO =
2.2: django22
3.0: django30
3.1: django31

[testenv]
passenv = TRAVIS TRAVIS_*
deps =
django22: Django>=2.2,<2.3
django30: Django>=3.0,<3.1
django31: Django>=3.1
django31: Django>=3.1,<3.2
pytest
pytest-cov
pytest-django
coveralls

commands = coverage run --source=django-pint setup.py test
commands =
coverage run --source=django-pint setup.py test
coveralls

0 comments on commit 689c450

Please sign in to comment.