Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move CI from travis.org to GitHub Actions #4

Merged
merged 4 commits into from
Sep 13, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Lint and Test

on: [push, pull_request]

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.5, 3.6, 3.7, 3.8, 3.9, pypy-3.7]

steps:
- uses: actions/checkout@v1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install wheel tox tox-gh-actions
- name: Test with tox
run: tox
- name: Build packages
run: |
python setup.py build sdist bdist_wheel
26 changes: 26 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Publish to PyPI on release
on:
release:
types: [published]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install setuptools wheel twine
- name: Build and Upload to TestPyPI
run: |
python setup.py build sdist bdist_wheel
python3 -m twine upload dist/*
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
TWINE_REPOSITORY: testpypi
37 changes: 0 additions & 37 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Changelog
0.7.2 (unreleased)
------------------

...
- compatibility with Django 3.1 & 3.2


0.7.1 (2019-12-02)
Expand Down
4 changes: 3 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@

import sys
import os
from django.conf import settings
settings.configure()

import enmerkar

Expand Down Expand Up @@ -271,4 +273,4 @@ def _short_version(release):


# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {'https://docs.python.org/': None}
intersphinx_mapping = {'https://docs.python.org/3/': None}
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ def read(*parts):
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: Implementation :: PyPy',
'Programming Language :: Python :: Implementation :: CPython',
],
Expand Down
4 changes: 2 additions & 2 deletions tests/testproject/urls.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import time

from django.conf.urls import url
from django.urls import re_path
from django.shortcuts import render
from django.utils.timezone import now

Expand All @@ -14,5 +14,5 @@ def test_view(request):


urlpatterns = [
url('^$', test_view),
re_path('^$', test_view),
]
23 changes: 16 additions & 7 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,30 +1,39 @@
[tox]
envlist = py{36,37,38}-{django30,django31,djangomaster}, py{35,36,37}-django22, pypy36-{django30,django31}, lint, docs
envlist = py{35,36,37,38,39}-django22, py{36,37,38,39}-{django30,django31,django32}, pypy37-{django30,django31,django32}, py{38,39}-{djangomain}, lint, docs

[testenv]
deps =
coverage
pytest
pytest-cov
pytest-django
python-coveralls
django22: Django>=2.2,<2.3
django30: Django>=3.0,<3.1
django31: Django>=3.1,<3.2
djangomaster: https://github.com/django/django/archive/master.tar.gz#egg=Django
django32: Django>=3.2,<3.3
djangomain: https://github.com/django/django/archive/main.tar.gz#egg=Django
commands = py.test {posargs}

[testenv:docs]
basepython = python3.6
basepython = python3.9
deps =
sphinx
Django>=3.0,<3.1
Django>=3.2,<3.3
commands =
sphinx-build -W -b html -d {envtmpdir}/doctrees docs {envtmpdir}/_build/html
sphinx-build -W -b linkcheck docs {envtmpdir}/_build/html

[testenv:lint]
basepython = python3.6
basepython = python3.9
deps =
flake8==3.8.2
flake8==3.9.2
commands=flake8 enmerkar tests

[gh-actions]
python =
3.5: py35
3.6: py36
3.7: py37
3.8: py38
3.9: py39, lint, docs
pypy-3.7: pypy37