forked from jazzband/django-recurrence
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update Python and Django versions and CI setup
Migrate from TravisCI to GitHub Actions Add dependabot configuration for automatic pakcageu pdates Update test setup to include QA and doc runs in main tox file Update requirements and move them into a single requirements.txt file
- Loading branch information
1 parent
fcb813c
commit 0d681a4
Showing
11 changed files
with
181 additions
and
96 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "pip" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" | ||
time: "12:00" | ||
open-pull-requests-limit: 10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
name: Test | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
build: | ||
name: build (Python ${{ matrix.python-version }}, Django ${{ matrix.django-version }}) | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
max-parallel: 5 | ||
matrix: | ||
python-version: ['3.7', '3.8', '3.9', '3.10', 'pypy-3.8'] | ||
django-version: ['2.2', '3.2'] | ||
include: | ||
# Tox configuration for documentation environment | ||
- python-version: '3.7' | ||
django-version: 'docs' | ||
# Tox configuration for QA environment | ||
- python-version: '3.7' | ||
django-version: 'qa' | ||
# # Django 4.0 | ||
# - python-version: '3.8' | ||
# django-version: '4.0' | ||
# - python-version: '3.9' | ||
# django-version: '4.0' | ||
# - python-version: '3.10' | ||
# django-version: '4.0' | ||
# # Django main | ||
# - python-version: '3.8' | ||
# django-version: 'main' | ||
# experimental: true | ||
# - python-version: '3.9' | ||
# django-version: 'main' | ||
# experimental: true | ||
# - python-version: '3.10' | ||
# django-version: 'main' | ||
# experimental: true | ||
exclude: | ||
# Exclude Django main branch for Python 3.7 as it is not supported | ||
- python-version: '3.7' | ||
django-version: 'main' | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Get pip cache dir | ||
id: pip-cache | ||
run: | | ||
echo "::set-output name=dir::$(pip cache dir)" | ||
- name: Cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: ${{ steps.pip-cache.outputs.dir }} | ||
key: | ||
${{ matrix.python-version }}-v1-${{ hashFiles('**/setup.py') }} | ||
restore-keys: | | ||
${{ matrix.python-version }}-v1- | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install --upgrade tox tox-gh-actions | ||
- name: Tox tests | ||
run: | | ||
tox -v | ||
env: | ||
DJANGO: ${{ matrix.django-version }} | ||
|
||
- name: Upload coverage | ||
uses: codecov/codecov-action@v1 | ||
with: | ||
name: Python ${{ matrix.python-version }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,3 +12,5 @@ dist/ | |
/.idea | ||
/.vscode | ||
/venv | ||
coverage.xml | ||
.eggs/ |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
[pytest] | ||
DJANGO_SETTINGS_MODULE = tests.settings | ||
addopts = --tb=short | ||
addopts = --cov recurrence --cov-append --cov-branch --cov-report term-missing --cov-report=xml | ||
testpaths = tests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
flake8==4.0.1 | ||
pytest-cov==3.0.0 | ||
pytest-django==4.5.2 | ||
pytest-sugar==0.9.4 | ||
pytest==6.2.5 | ||
sphinx==4.3.2 | ||
sphinx_rtd_theme==1.0.0 | ||
tox==3.24.5 |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,52 +1,43 @@ | ||
import os | ||
import sys | ||
|
||
from setuptools import setup | ||
from setuptools.command.test import test as TestCommand | ||
|
||
|
||
class PyTest(TestCommand): | ||
def finalize_options(self): | ||
self.test_args = [] | ||
self.test_suite = True | ||
|
||
super().finalize_options() | ||
|
||
def run_tests(self): | ||
import pytest | ||
|
||
errno = pytest.main(self.test_args) | ||
sys.exit(errno) | ||
|
||
|
||
with open("README.md", "r") as fh: | ||
long_description = fh.read() | ||
|
||
|
||
setup( | ||
name="django-recurrence", | ||
version="1.10.3", | ||
use_scm_version=True, | ||
license="BSD", | ||
description="Django utility wrapping dateutil.rrule", | ||
long_description=long_description, | ||
long_description=open("README.md", encoding="utf-8").read(), | ||
long_description_content_type="text/markdown", | ||
author="Tamas Kemenczy", | ||
author_email="[email protected]", | ||
url="https://github.com/django-recurrence/django-recurrence", | ||
classifiers=( | ||
classifiers=[ | ||
"Development Status :: 5 - Production/Stable", | ||
"Environment :: Web Environment", | ||
"Environment :: Plugins", | ||
"Framework :: Django", | ||
"Framework :: Django", | ||
"Framework :: Django :: 2.2", | ||
"Framework :: Django :: 3.2", | ||
# "Framework :: Django :: 4.0", | ||
"Intended Audience :: Developers", | ||
"License :: OSI Approved :: BSD License", | ||
"Operating System :: OS Independent", | ||
"Programming Language :: Python", | ||
"Programming Language :: Python :: 3", | ||
"Programming Language :: Python :: 3.6", | ||
"Programming Language :: Python :: 3.7", | ||
), | ||
install_requires=("Django", "pytz", "python-dateutil"), | ||
packages=("recurrence", "recurrence.migrations"), | ||
"Programming Language :: Python :: 3.8", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: Implementation", | ||
"Programming Language :: Python :: Implementation :: CPython", | ||
"Programming Language :: Python :: Implementation :: PyPy", | ||
], | ||
python_requires=">=3.7", | ||
install_requires=["django>=2.2,<4.0", "pytz", "python-dateutil"], | ||
setup_requires=["setuptools_scm"], | ||
packages=["recurrence", "recurrence.migrations"], | ||
package_dir={"recurrence": "recurrence"}, | ||
package_data={ | ||
"recurrence": [ | ||
|
@@ -59,5 +50,4 @@ def run_tests(self): | |
}, | ||
zip_safe=False, | ||
include_package_data=True, | ||
cmdclass={"test": PyTest}, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,59 @@ | ||
[tox] | ||
envlist = {py36,py37}-{111,21,22,master},docs,flake8 | ||
envlist = | ||
py37-djdocs | ||
py37-djqa | ||
py{37,38,39,310,py38}-dj22 | ||
py{37,38,39,310,py38}-dj32 | ||
# py{38,39,310,py38}-dj40 | ||
# py{38,39,310,py38}-djmain | ||
|
||
[gh-actions] | ||
python = | ||
3.7: py37 | ||
3.8: py38 | ||
3.9: py39 | ||
3.10: py310 | ||
pypy-3.8: pypy38 | ||
|
||
[gh-actions:env] | ||
DJANGO = | ||
docs: djdocs | ||
qa: djqa | ||
2.2: dj22 | ||
3.2: dj32 | ||
# 4.0: dj40 | ||
# main: djmain | ||
|
||
[testenv] | ||
basepython = | ||
py36: python3.6 | ||
py37: python3.7 | ||
deps= | ||
-r requirements_test.txt | ||
111: django>=1.11,<1.12 | ||
21: django>=2.1,<2.2 | ||
22: django>=2.2,<2.3 | ||
master: https://github.com/django/django/archive/master.tar.gz | ||
commands=python setup.py test | ||
usedevelop = true | ||
setenv = | ||
PYTHONDONTWRITEBYTECODE=1 | ||
deps = | ||
-r requirements.txt | ||
dj22: django>=2.2,<2.3 | ||
dj32: django>=3.2,<3.3 | ||
# dj40: django>=4.0,4.1 | ||
# djmain: https://github.com/django/django/archive/main.tar.gz | ||
commands = | ||
pytest | ||
|
||
[testenv:docs] | ||
basepython=python | ||
changedir=docs | ||
deps= | ||
sphinx | ||
sphinx_rtd_theme | ||
whitelist_externals = echo | ||
commands= | ||
sphinx-build -W -b html -d {envtmpdir}/doctrees . {envtmpdir}/html | ||
echo "" | ||
echo "The built documentation is available in {envtmpdir}/html" | ||
[testenv:py37-djqa] | ||
basepython = python3.7 | ||
ignore_errors = true | ||
deps = | ||
-r requirements.txt | ||
commands = | ||
flake8 recurrence | ||
flake8 setup.py | ||
flake8 tests | ||
|
||
[testenv:flake8] | ||
basepython=python | ||
deps=flake8==2.1.0 | ||
commands= | ||
flake8 recurrence | ||
flake8 setup.py | ||
flake8 tests | ||
[testenv:py37-djdocs] | ||
basepython = python3.7 | ||
changedir = docs | ||
deps = | ||
-r requirements.txt | ||
commands = | ||
sphinx-build -W -b html -d {envtmpdir}/doctrees . {envtmpdir}/html | ||
|
||
[flake8] | ||
ignore = E122,E125,E129,E501 | ||
ignore = E122,E125,E129,E501,W503,W504 |