Skip to content

Commit

Permalink
ci: test against Python 3.9 and Django 3.2
Browse files Browse the repository at this point in the history
  • Loading branch information
jerivas committed May 27, 2021
1 parent 29ec79b commit 721847e
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 27 deletions.
15 changes: 11 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
name: Test and release

# Fires on all incoming commits
on: [push]
on:
pull_request:
push:

jobs:

Expand All @@ -10,19 +12,24 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python: [3.6, 3.7, 3.8]
python: [3.6, 3.7, 3.8, 3.9]

steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python }}
- name: Install dependencies
run: pip install tox tox-gh-actions
run: pip install tox tox-gh-actions -U pip
- name: Run tests
run: tox --parallel
run: |
tox --skip-missing-interpreters=false --parallel
env:
TOX_PARALLEL_NO_SPINNER: 1
- name: Publish Test Report
uses: mikepenz/action-junit-report@v2
with:
report_paths: '**/junit/TEST-*.xml'

# Create a new semantic release
release:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
.coverage
.idea/
.pytest_cache
junit/
local_settings.py
.eggs/
.tox/
Expand Down
2 changes: 1 addition & 1 deletion .releaserc
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"@semantic-release/github",
["@semantic-release/exec", {
"verifyConditionsCmd": "python -m pip install -U pip setuptools wheel twine",
"prepareCmd": "sed -i 's/0.0.dev0/${nextRelease.version}/' mezzanine/__init__.py",
"prepareCmd": "sed -i 's/9999dev0/${nextRelease.version}/' mezzanine/__init__.py",
"publishCmd": "python setup.py sdist bdist_wheel && twine upload dist/*"
}]
]
Expand Down
2 changes: 1 addition & 1 deletion mezzanine/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.0.dev0" # Do not edit, managed by semantic-release
__version__ = "9999dev0" # Do not edit, managed by semantic-release
48 changes: 27 additions & 21 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -21,32 +21,33 @@ classifiers =
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Topic :: Internet :: WWW/HTTP
Topic :: Internet :: WWW/HTTP :: Dynamic Content
Topic :: Internet :: WWW/HTTP :: WSGI
Topic :: Software Development :: Libraries :: Application Frameworks
Topic :: Software Development :: Libraries :: Python Modules

[options]
python_requires = >=3.6, <3.9
python_requires = >=3.6
packages = mezzanine
include_package_data = true
install_requires =
django-contrib-comments >= 1.9, <1.10
django >= 2.2, < 3.0
filebrowser_safe==1.0.0a1
grappelli_safe==1.0.0a1
tzlocal >= 2, <3
bleach >= 2, <4
django-contrib-comments >= 1.9
django >= 2.2
filebrowser-safe >= 0.5
grappelli-safe >= 0.5
tzlocal >= 2
bleach >= 2
beautifulsoup4 >= 4.5.3
requests >= 2.1.0, <3
requests-oauthlib >= 1.3, <2
pillow >= 7, <8
requests >= 2.1.0
requests-oauthlib >= 1.3
pillow >= 7
chardet

[options.extras_require]
testing =
pytest-django >= 3, <4
pytest-django >= 4, <5
codestyle =
flake8 >= 3, <4
black==20.8b1
Expand All @@ -63,30 +64,34 @@ universal = 1
# Testing

[tox:tox]
skip_missing_interpreters = true
envlist =
py{36,37,38}-dj{22,30,31,master}
py{36,37,38,39}-dj{22,30,31,32}
py{38,39}-dj{main}
flake8
black
package

[testenv]
# Run test suite
usedevelop = true
deps =
.[testing]
https://github.com/stephenmcd/filebrowser-safe/archive/master.tar.gz#egg=filebrowser_safe
https://github.com/stephenmcd/grappelli-safe/archive/master.tar.gz#egg=grappelli_safe
dj22: Django>=2.2, <3
dj30: Django>=3.0, <3.1
dj31: Django>=3.1, <3.2
djmaster: https://github.com/django/django/archive/master.tar.gz#egg=Django
dj32: Django>=3.2, <3.3
djmain: https://github.com/django/django/archive/main.tar.gz#egg=Django
commands =
pytest --basetemp="{envtmpdir}" --ignore Mezzanine-0.0.dev0 {posargs}
pytest --basetemp="{envtmpdir}" --junitxml="junit/TEST-{envname}.xml" {posargs}

[testenv:py{36,37,38}-djmaster]
# Same as above, but ignoring the output while testing against Django master
[testenv:py{38,39}-djmain]
# Same as above, but ignoring the output while testing against Django main
ignore_outcome = true
deps =
{[testenv]deps}
commands =
{[testenv]commands}
deps = {[testenv]deps}
commands = {[testenv]commands}

[testenv:package]
# Check package integrity and compatibility with PyPI
Expand Down Expand Up @@ -139,4 +144,5 @@ exclude =
python =
3.6: py36
3.7: py37
3.8: py38, flake8, black, package
3.8: py38
3.8: py39, flake8, black, package

0 comments on commit 721847e

Please sign in to comment.