mirror of
https://github.com/jazzband/django-downloadview.git
synced 2026-03-16 22:40:25 +00:00
Migrate to GitHub Actions. (#165)
* Add GitHub Actions test workflow. * Add django version env var handling to tox config. * Update badges. * Add release workflow. * Remove Travis. * Fix typo. * Fix more typos. * Write coverage.xml. * Remove the need for the VERSION file. * Simplify demo setup.py. * Remove VERSION file. * Update demo/setup.py * Update setup.py
This commit is contained in:
parent
384e7c5b13
commit
9f42e65986
14 changed files with 227 additions and 238 deletions
40
.github/workflows/release.yml
vendored
Normal file
40
.github/workflows/release.yml
vendored
Normal file
|
|
@ -0,0 +1,40 @@
|
||||||
|
name: Release
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- '*'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
if: github.repository == 'jazzband/django-downloadview'
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Set up Python
|
||||||
|
uses: actions/setup-python@v2
|
||||||
|
with:
|
||||||
|
python-version: 3.8
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
python -m pip install -U pip
|
||||||
|
python -m pip install -U setuptools twine wheel
|
||||||
|
|
||||||
|
- name: Build package
|
||||||
|
run: |
|
||||||
|
python setup.py --version
|
||||||
|
python setup.py sdist --format=gztar bdist_wheel
|
||||||
|
twine check dist/*
|
||||||
|
|
||||||
|
- name: Upload packages to Jazzband
|
||||||
|
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
|
||||||
|
uses: pypa/gh-action-pypi-publish@master
|
||||||
|
with:
|
||||||
|
user: jazzband
|
||||||
|
password: ${{ secrets.JAZZBAND_RELEASE_KEY }}
|
||||||
|
repository_url: https://jazzband.co/projects/django-downloadview/upload
|
||||||
52
.github/workflows/test.yml
vendored
Normal file
52
.github/workflows/test.yml
vendored
Normal file
|
|
@ -0,0 +1,52 @@
|
||||||
|
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.6', '3.7', '3.8', '3.9']
|
||||||
|
django-version: ['2.2', '3.0', '3.1', 'master']
|
||||||
|
|
||||||
|
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 }}
|
||||||
4
.gitignore
vendored
4
.gitignore
vendored
|
|
@ -6,6 +6,8 @@
|
||||||
|
|
||||||
# Data files.
|
# Data files.
|
||||||
/var/
|
/var/
|
||||||
|
coverage.xml
|
||||||
|
.coverage/
|
||||||
|
|
||||||
# Python files.
|
# Python files.
|
||||||
*.pyc
|
*.pyc
|
||||||
|
|
@ -14,6 +16,8 @@
|
||||||
|
|
||||||
# Tox files.
|
# Tox files.
|
||||||
/.tox/
|
/.tox/
|
||||||
|
.eggs
|
||||||
|
*.egg-info
|
||||||
|
|
||||||
# Virtualenv files (created by tox).
|
# Virtualenv files (created by tox).
|
||||||
/build/
|
/build/
|
||||||
|
|
|
||||||
34
.travis.yml
34
.travis.yml
|
|
@ -1,34 +0,0 @@
|
||||||
language: python
|
|
||||||
dist: bionic
|
|
||||||
python:
|
|
||||||
- 3.6
|
|
||||||
- 3.7
|
|
||||||
- 3.8
|
|
||||||
- 3.9-dev
|
|
||||||
install:
|
|
||||||
- pip install tox tox-travis
|
|
||||||
script:
|
|
||||||
- tox -v
|
|
||||||
jobs:
|
|
||||||
fast_finish: true
|
|
||||||
include:
|
|
||||||
- stage: deploy
|
|
||||||
env:
|
|
||||||
python: 3.7
|
|
||||||
script: skip
|
|
||||||
deploy:
|
|
||||||
provider: pypi
|
|
||||||
user: jazzband
|
|
||||||
server: https://jazzband.co/projects/django-downloadview/upload
|
|
||||||
distributions: sdist bdist_wheel
|
|
||||||
password:
|
|
||||||
secure: TYFfz5OkSH0YwTKh0lc0PbddcuZh5oL2H1AVIXHs2dODQ46PNgLYgDRe9k9PItAenxm7QCnGRONJo2o1GNuiCcAOWK84jbrmufHZ5EeKTOVtssyrffSA/Oxfs5mFJ/Kgy3o8FC1hGRKXrXFN3bvedmVHERGQimQESPxHQ9sPWhc=
|
|
||||||
skip_existing: true
|
|
||||||
skip_cleanup: true
|
|
||||||
on:
|
|
||||||
tags: true
|
|
||||||
repo: jazzband/django-downloadview
|
|
||||||
python: 3.7
|
|
||||||
after_success:
|
|
||||||
- pip install coveralls
|
|
||||||
- coveralls
|
|
||||||
|
|
@ -6,4 +6,3 @@ include CONTRIBUTING.rst
|
||||||
include INSTALL
|
include INSTALL
|
||||||
include LICENSE
|
include LICENSE
|
||||||
include README.rst
|
include README.rst
|
||||||
include VERSION
|
|
||||||
|
|
|
||||||
6
Makefile
6
Makefile
|
|
@ -92,12 +92,6 @@ demo:
|
||||||
runserver: demo
|
runserver: demo
|
||||||
demo runserver
|
demo runserver
|
||||||
|
|
||||||
|
|
||||||
#: release - Tag and push to PyPI.
|
|
||||||
.PHONY: release
|
|
||||||
release:
|
|
||||||
$(TOX) -e release
|
|
||||||
|
|
||||||
.PHONY: black
|
.PHONY: black
|
||||||
black:
|
black:
|
||||||
$(BLACK) demo tests django_downloadview
|
$(BLACK) demo tests django_downloadview
|
||||||
|
|
|
||||||
15
README.rst
15
README.rst
|
|
@ -11,13 +11,17 @@ django-downloadview
|
||||||
|
|
||||||
.. image:: https://img.shields.io/pypi/pyversions/django-downloadview.svg
|
.. image:: https://img.shields.io/pypi/pyversions/django-downloadview.svg
|
||||||
:target: https://pypi.python.org/pypi/django-downloadview
|
:target: https://pypi.python.org/pypi/django-downloadview
|
||||||
|
|
||||||
.. image:: https://img.shields.io/pypi/dm/django-downloadview.svg
|
.. image:: https://img.shields.io/pypi/dm/django-downloadview.svg
|
||||||
:target: https://pypi.python.org/pypi/django-downloadview
|
:target: https://pypi.python.org/pypi/django-downloadview
|
||||||
.. image:: https://travis-ci.org/jazzband/django-downloadview.svg?branch=master
|
|
||||||
:target: https://travis-ci.org/jazzband/django-downloadview
|
|
||||||
.. image:: https://coveralls.io/repos/github/jazzband/django-downloadview/badge.svg?branch=master
|
|
||||||
:target: https://coveralls.io/github/jazzband/django-downloadview?branch=master
|
|
||||||
|
|
||||||
|
.. image:: https://github.com/jazzband/django-downloadview/workflows/Test/badge.svg
|
||||||
|
:target: https://github.com/jazzband/django-downloadview/actions
|
||||||
|
:alt: GitHub Actions
|
||||||
|
|
||||||
|
.. image:: https://codecov.io/gh/jazzband/django-downloadview/branch/master/graph/badge.svg
|
||||||
|
:target: https://codecov.io/gh/jazzband/django-downloadview
|
||||||
|
:alt: Coverage
|
||||||
|
|
||||||
`django-downloadview` makes it easy to serve files with `Django`_:
|
`django-downloadview` makes it easy to serve files with `Django`_:
|
||||||
|
|
||||||
|
|
@ -60,8 +64,7 @@ Resources
|
||||||
* PyPI page: http://pypi.python.org/pypi/django-downloadview
|
* PyPI page: http://pypi.python.org/pypi/django-downloadview
|
||||||
* Code repository: https://github.com/jazzband/django-downloadview
|
* Code repository: https://github.com/jazzband/django-downloadview
|
||||||
* Bugtracker: https://github.com/jazzband/django-downloadview/issues
|
* Bugtracker: https://github.com/jazzband/django-downloadview/issues
|
||||||
* Continuous integration: https://travis-ci.org/jazzband/django-downloadview
|
* Continuous integration: https://github.com/jazzband/django-downloadview/actions
|
||||||
* Roadmap: https://github.com/jazzband/django-downloadview/milestones
|
* Roadmap: https://github.com/jazzband/django-downloadview/milestones
|
||||||
|
|
||||||
|
|
||||||
.. _`Django`: https://djangoproject.com
|
.. _`Django`: https://djangoproject.com
|
||||||
|
|
|
||||||
1
VERSION
1
VERSION
|
|
@ -1 +0,0 @@
|
||||||
2.3.dev0
|
|
||||||
|
|
@ -1,46 +1,26 @@
|
||||||
"""Python packaging."""
|
|
||||||
import os
|
import os
|
||||||
|
|
||||||
from setuptools import setup
|
from setuptools import setup
|
||||||
|
|
||||||
here = os.path.abspath(os.path.dirname(__file__))
|
here = os.path.abspath(os.path.dirname(__file__))
|
||||||
project_root = os.path.dirname(here)
|
|
||||||
|
|
||||||
|
setup(
|
||||||
NAME = "django-downloadview-demo"
|
name="django-downloadview-demo",
|
||||||
DESCRIPTION = "Serve files with Django and reverse-proxies."
|
version="1.0",
|
||||||
README = open(os.path.join(here, "README.rst")).read()
|
description="Serve files with Django and reverse-proxies.",
|
||||||
VERSION = open(os.path.join(project_root, "VERSION")).read().strip()
|
long_description=open(os.path.join(here, "README.rst")).read(),
|
||||||
AUTHOR = "Benoît Bryon"
|
classifiers=[
|
||||||
EMAIL = "benoit@marmelune.net"
|
|
||||||
URL = "https://django-downloadview.readthedocs.io/"
|
|
||||||
CLASSIFIERS = [
|
|
||||||
"Development Status :: 5 - Production/Stable",
|
"Development Status :: 5 - Production/Stable",
|
||||||
"License :: OSI Approved :: BSD License",
|
"License :: OSI Approved :: BSD License",
|
||||||
"Programming Language :: Python :: 2.7",
|
"Programming Language :: Python :: 3",
|
||||||
"Framework :: Django",
|
"Framework :: Django",
|
||||||
]
|
],
|
||||||
KEYWORDS = []
|
author="Benoît Bryon",
|
||||||
PACKAGES = ["demoproject"]
|
author_email="benoit@marmelune.net",
|
||||||
REQUIREMENTS = ["django-downloadview", "django-nose"]
|
url="https://django-downloadview.readthedocs.io/",
|
||||||
ENTRY_POINTS = {"console_scripts": ["demo = demoproject.manage:main"]}
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__": # Don't run setup() when we import this module.
|
|
||||||
setup(
|
|
||||||
name=NAME,
|
|
||||||
version=VERSION,
|
|
||||||
description=DESCRIPTION,
|
|
||||||
long_description=README,
|
|
||||||
classifiers=CLASSIFIERS,
|
|
||||||
keywords=" ".join(KEYWORDS),
|
|
||||||
author=AUTHOR,
|
|
||||||
author_email=EMAIL,
|
|
||||||
url=URL,
|
|
||||||
license="BSD",
|
license="BSD",
|
||||||
packages=PACKAGES,
|
packages=["demoproject"],
|
||||||
include_package_data=True,
|
include_package_data=True,
|
||||||
zip_safe=False,
|
zip_safe=False,
|
||||||
install_requires=REQUIREMENTS,
|
install_requires=["django-downloadview", "django-nose"],
|
||||||
entry_points=ENTRY_POINTS,
|
entry_points={"console_scripts": ["demo = demoproject.manage:main"]},
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@
|
||||||
"""django-downloadview documentation build configuration file."""
|
"""django-downloadview documentation build configuration file."""
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
|
from pkg_resources import get_distribution
|
||||||
|
|
||||||
# Minimal Django settings. Required to use sphinx.ext.autodoc, because
|
# Minimal Django settings. Required to use sphinx.ext.autodoc, because
|
||||||
# django-downloadview depends on Django...
|
# django-downloadview depends on Django...
|
||||||
|
|
@ -45,14 +46,11 @@ author_slug = re.sub(r"([\w_.-]+)", "-", author)
|
||||||
# The version info for the project you're documenting, acts as replacement for
|
# The version info for the project you're documenting, acts as replacement for
|
||||||
# |version| and |release|, also used in various other places throughout the
|
# |version| and |release|, also used in various other places throughout the
|
||||||
# built documents.
|
# built documents.
|
||||||
configuration_dir = os.path.dirname(__file__)
|
|
||||||
documentation_dir = configuration_dir
|
|
||||||
version_file = os.path.normpath(os.path.join(documentation_dir, "../VERSION"))
|
|
||||||
|
|
||||||
# The full version, including alpha/beta/rc tags.
|
# The full version, including alpha/beta/rc tags.
|
||||||
release = open(version_file).read().strip()
|
release = get_distribution("django-downloadview").version
|
||||||
# The short X.Y version.
|
# The short X.Y version.
|
||||||
version = ".".join(release.split(".")[0:1])
|
version = '.'.join(release.split('.')[:2])
|
||||||
|
|
||||||
# The language for content autogenerated by Sphinx. Refer to documentation
|
# The language for content autogenerated by Sphinx. Refer to documentation
|
||||||
# for a list of supported languages.
|
# for a list of supported languages.
|
||||||
|
|
|
||||||
100
setup.py
100
setup.py
|
|
@ -1,40 +1,17 @@
|
||||||
#!/usr/bin/env python
|
|
||||||
"""Python packaging."""
|
|
||||||
import os
|
import os
|
||||||
import sys
|
|
||||||
|
|
||||||
from setuptools import setup
|
from setuptools import setup
|
||||||
from setuptools.command.test import test as TestCommand
|
|
||||||
|
|
||||||
|
|
||||||
class Tox(TestCommand):
|
|
||||||
"""Test command that runs tox."""
|
|
||||||
|
|
||||||
def finalize_options(self):
|
|
||||||
TestCommand.finalize_options(self)
|
|
||||||
self.test_args = []
|
|
||||||
self.test_suite = True
|
|
||||||
|
|
||||||
def run_tests(self):
|
|
||||||
import tox # import here, cause outside the eggs aren't loaded.
|
|
||||||
|
|
||||||
errno = tox.cmdline(self.test_args)
|
|
||||||
sys.exit(errno)
|
|
||||||
|
|
||||||
|
|
||||||
#: Absolute path to directory containing setup.py file.
|
#: Absolute path to directory containing setup.py file.
|
||||||
here = os.path.abspath(os.path.dirname(__file__))
|
here = os.path.abspath(os.path.dirname(__file__))
|
||||||
|
|
||||||
|
setup(
|
||||||
NAME = "django-downloadview"
|
name="django-downloadview",
|
||||||
DESCRIPTION = "Serve files with Django and reverse-proxies."
|
use_scm_version={"version_scheme": "post-release"},
|
||||||
README = open(os.path.join(here, "README.rst")).read()
|
setup_requires=["setuptools_scm"],
|
||||||
VERSION = open(os.path.join(here, "VERSION")).read().strip()
|
description="Serve files with Django and reverse-proxies.",
|
||||||
AUTHOR = "Benoît Bryon"
|
long_description=open(os.path.join(here, "README.rst")).read(),
|
||||||
EMAIL = "benoit@marmelune.net"
|
long_description_content_type='text/x-rst',
|
||||||
LICENSE = "BSD"
|
classifiers=[
|
||||||
URL = "https://{name}.readthedocs.io/".format(name=NAME)
|
|
||||||
CLASSIFIERS = [
|
|
||||||
"Development Status :: 5 - Production/Stable",
|
"Development Status :: 5 - Production/Stable",
|
||||||
"Framework :: Django",
|
"Framework :: Django",
|
||||||
"License :: OSI Approved :: BSD License",
|
"License :: OSI Approved :: BSD License",
|
||||||
|
|
@ -43,8 +20,9 @@ CLASSIFIERS = [
|
||||||
"Programming Language :: Python :: 3.7",
|
"Programming Language :: Python :: 3.7",
|
||||||
"Programming Language :: Python :: 3.8",
|
"Programming Language :: Python :: 3.8",
|
||||||
"Programming Language :: Python :: 3.9",
|
"Programming Language :: Python :: 3.9",
|
||||||
]
|
],
|
||||||
KEYWORDS = [
|
keywords=" ".join(
|
||||||
|
[
|
||||||
"file",
|
"file",
|
||||||
"stream",
|
"stream",
|
||||||
"download",
|
"download",
|
||||||
|
|
@ -56,43 +34,29 @@ KEYWORDS = [
|
||||||
"sendfile",
|
"sendfile",
|
||||||
"mod_xsendfile",
|
"mod_xsendfile",
|
||||||
"offload",
|
"offload",
|
||||||
]
|
]
|
||||||
PACKAGES = [NAME.replace("-", "_")]
|
),
|
||||||
REQUIREMENTS = [
|
author="Benoît Bryon",
|
||||||
|
author_email="benoit@marmelune.net",
|
||||||
|
url="https://django-downloadview.readthedocs.io/",
|
||||||
|
license="BSD",
|
||||||
|
packages=[
|
||||||
|
"django_downloadview",
|
||||||
|
"django_downloadview.apache",
|
||||||
|
"django_downloadview.lighttpd",
|
||||||
|
"django_downloadview.nginx",
|
||||||
|
"django_downloadview.views",
|
||||||
|
],
|
||||||
|
include_package_data=True,
|
||||||
|
zip_safe=False,
|
||||||
|
install_requires=[
|
||||||
# BEGIN requirements
|
# BEGIN requirements
|
||||||
"Django>=1.11",
|
"Django>=1.11",
|
||||||
"requests",
|
"requests",
|
||||||
"setuptools",
|
"setuptools",
|
||||||
# END requirements
|
# END requirements
|
||||||
]
|
],
|
||||||
ENTRY_POINTS = {}
|
extras_require={
|
||||||
SETUP_REQUIREMENTS = ["setuptools"]
|
"test": ["tox"],
|
||||||
TEST_REQUIREMENTS = ["tox"]
|
},
|
||||||
CMDCLASS = {"test": Tox}
|
)
|
||||||
EXTRA_REQUIREMENTS = {
|
|
||||||
"test": TEST_REQUIREMENTS,
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__": # Don't run setup() when we import this module.
|
|
||||||
setup(
|
|
||||||
name=NAME,
|
|
||||||
version=VERSION,
|
|
||||||
description=DESCRIPTION,
|
|
||||||
long_description=README,
|
|
||||||
classifiers=CLASSIFIERS,
|
|
||||||
keywords=" ".join(KEYWORDS),
|
|
||||||
author=AUTHOR,
|
|
||||||
author_email=EMAIL,
|
|
||||||
url=URL,
|
|
||||||
license=LICENSE,
|
|
||||||
packages=PACKAGES,
|
|
||||||
include_package_data=True,
|
|
||||||
zip_safe=False,
|
|
||||||
install_requires=REQUIREMENTS,
|
|
||||||
entry_points=ENTRY_POINTS,
|
|
||||||
tests_require=TEST_REQUIREMENTS,
|
|
||||||
cmdclass=CMDCLASS,
|
|
||||||
setup_requires=SETUP_REQUIREMENTS,
|
|
||||||
extras_require=EXTRA_REQUIREMENTS,
|
|
||||||
)
|
|
||||||
|
|
|
||||||
|
|
@ -44,17 +44,3 @@ class VersionTestCase(unittest.TestCase):
|
||||||
"installed version in development environment."
|
"installed version in development environment."
|
||||||
% (self.get_version(), installed_version),
|
% (self.get_version(), installed_version),
|
||||||
)
|
)
|
||||||
|
|
||||||
def test_version_file(self):
|
|
||||||
"""django_downloadview.__version__ matches VERSION file info."""
|
|
||||||
version_file = os.path.join(project_dir, "VERSION")
|
|
||||||
file_version = open(version_file).read().strip()
|
|
||||||
self.assertEqual(
|
|
||||||
file_version,
|
|
||||||
self.get_version(),
|
|
||||||
"Version mismatch: django_downloadview.__version__ "
|
|
||||||
'is "%s" whereas VERSION file tells "%s". '
|
|
||||||
"You may need to run ``make develop`` to update the "
|
|
||||||
"installed version in development environment."
|
|
||||||
% (self.get_version(), file_version),
|
|
||||||
)
|
|
||||||
|
|
|
||||||
56
tox.ini
56
tox.ini
|
|
@ -1,26 +1,41 @@
|
||||||
[tox]
|
[tox]
|
||||||
envlist = py{36,37,38,39}-django{22,30,31},
|
envlist =
|
||||||
flake8, sphinx, readme
|
py{36,37,38,39}-dj{22,30,31,master}
|
||||||
|
lint
|
||||||
|
sphinx
|
||||||
|
readme
|
||||||
|
|
||||||
[travis]
|
[gh-actions]
|
||||||
python=
|
python =
|
||||||
3.8: py38, flake8, sphinx, readme
|
3.6: py36
|
||||||
|
3.7: py37
|
||||||
|
3.8: py38, lint, sphinx, readme
|
||||||
|
3.9: py39
|
||||||
|
|
||||||
|
[gh-actions:env]
|
||||||
|
DJANGO =
|
||||||
|
2.2: dj22
|
||||||
|
3.0: dj30
|
||||||
|
3.1: dj31
|
||||||
|
master: djmaster
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
deps =
|
deps =
|
||||||
coverage
|
coverage
|
||||||
django22: Django>=2.2,<3.0
|
dj22: Django>=2.2,<3.0
|
||||||
django30: Django>=3.0,<3.1
|
dj30: Django>=3.0,<3.1
|
||||||
django31: Django>=3.1,<3.2
|
dj31: Django>=3.1,<3.2
|
||||||
|
djmaster: https://github.com/django/django/archive/master.tar.gz
|
||||||
nose
|
nose
|
||||||
py27: mock
|
|
||||||
commands =
|
commands =
|
||||||
pip install -e .
|
pip install -e .
|
||||||
pip install -e demo
|
pip install -e demo
|
||||||
python -Wd {envbindir}/demo test --cover-package=django_downloadview --cover-package=demoproject {posargs: tests demoproject}
|
python -Wd {envbindir}/demo test --cover-package=django_downloadview --cover-package=demoproject --cover-xml {posargs: tests demoproject}
|
||||||
pip freeze
|
pip freeze
|
||||||
|
ignore_outcome =
|
||||||
|
djmaster: True
|
||||||
|
|
||||||
[testenv:flake8]
|
[testenv:lint]
|
||||||
deps =
|
deps =
|
||||||
flake8
|
flake8
|
||||||
black
|
black
|
||||||
|
|
@ -40,22 +55,11 @@ whitelist_externals =
|
||||||
make
|
make
|
||||||
|
|
||||||
[testenv:readme]
|
[testenv:readme]
|
||||||
deps =
|
description = Ensure README renders on PyPI
|
||||||
docutils
|
deps = twine
|
||||||
pygments
|
|
||||||
commands =
|
commands =
|
||||||
mkdir -p var/docs
|
{envpython} setup.py -q sdist bdist_wheel
|
||||||
rst2html.py --exit-status=2 README.rst var/docs/README.html
|
twine check dist/*
|
||||||
rst2html.py --exit-status=2 CONTRIBUTING.rst var/docs/CONTRIBUTING.html
|
|
||||||
whitelist_externals =
|
|
||||||
mkdir
|
|
||||||
|
|
||||||
[testenv:release]
|
|
||||||
deps =
|
|
||||||
wheel
|
|
||||||
zest.releaser
|
|
||||||
commands =
|
|
||||||
fullrelease
|
|
||||||
|
|
||||||
[flake8]
|
[flake8]
|
||||||
max-line-length = 88
|
max-line-length = 88
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue