Skip to content

Commit

Permalink
Migrate to GitHub Actions. (#703)
Browse files Browse the repository at this point in the history
* Add GitHub Actions test workflow.

* Remove cruft.

* Add release workflow.

* Fix tox config.

* Don't start Redis.

* Update tox.ini

Co-authored-by: Aleksi Häkli <aleksi.hakli@iki.fi>

* Update tox.ini

Co-authored-by: Aleksi Häkli <aleksi.hakli@iki.fi>

* Update tox.ini

Co-authored-by: Aleksi Häkli <aleksi.hakli@iki.fi>

* Update changelog and trove classifiers.

Co-authored-by: Aleksi Häkli <aleksi.hakli@iki.fi>
  • Loading branch information
jezdez and aleksihakli committed Dec 21, 2020
1 parent 1e4dca3 commit b08ed6d
Show file tree
Hide file tree
Showing 7 changed files with 114 additions and 58 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Release

on:
push:
tags:
- '*'

jobs:
build:
if: github.repository == 'jazzband/django-taggit'
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-taggit/upload
48 changes: 48 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Test

on: [push, pull_request]

jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
max-parallel: 5
matrix:
python-version: ['3.6', '3.7', '3.8', '3.9']

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') }}-${{ hashFiles('**/tox.ini') }}
restore-keys: |
${{ matrix.python-version }}-v1-
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade tox tox-gh-actions
- name: Tox tests
run: |
tox -v
- name: Upload coverage
uses: codecov/codecov-action@v1
with:
name: Python ${{ matrix.python-version }}
45 changes: 0 additions & 45 deletions .travis.yml

This file was deleted.

7 changes: 7 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
Changelog
=========

Unreleased
~~~~~~~~~~

* Added support for Python 3.9.

* Dropped support for Python 3.5 and Django 1.11.

1.3.0 (2020-05-19)
~~~~~~~~~~~~~~~~~~

Expand Down
5 changes: 3 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ django-taggit
:target: https://jazzband.co/
:alt: Jazzband

.. image:: https://travis-ci.org/jazzband/django-taggit.svg?branch=master
:target: https://travis-ci.org/jazzband/django-taggit
.. image:: https://github.com/jazzband/django-taggit/workflows/Test/badge.svg
:target: https://github.com/jazzband/django-taggit/actions
:alt: GitHub Actions

.. image:: https://codecov.io/gh/jazzband/django-taggit/coverage.svg?branch=master
:target: https://codecov.io/gh/jazzband/django-taggit?branch=master
Expand Down
6 changes: 3 additions & 3 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -11,26 +11,26 @@ classifiers =
Development Status :: 5 - Production/Stable
Environment :: Web Environment
Framework :: Django
Framework :: Django :: 1.11
Framework :: Django :: 2.2
Framework :: Django :: 3.0
Framework :: Django :: 3.1
Intended Audience :: Developers
License :: OSI Approved :: BSD License
Operating System :: OS Independent
Programming Language :: Python
Programming Language :: Python :: 3
Programming Language :: Python :: 3 :: Only
Programming Language :: Python :: 3.5
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
project_urls =
Documentation = https://django-taggit.readthedocs.io
Source = https://github.com/jazzband/django-taggit
Tracker = https://github.com/jazzband/django-taggit/issues

[options]
python_requires = >=3.5
python_requires = >=3.6
packages = find:
install_requires = Django>=1.11
include_package_data = true
Expand Down
21 changes: 13 additions & 8 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,32 @@ envlist =
black
flake8
isort
py35-django111
py{36,37,38}-django{111, 22, 30, master}
py{36,37,38,39}-dj{22,30,31,master}
docs

[travis]
[gh-actions]
python =
3.5: py35
3.6: py36
3.7: py37
3.8: py38
3.8: py38, black, flake8, isort
3.9: py39

[testenv]
deps =
django111: Django~=1.11.0
django22: Django>=2.2<3.0
django30: Django>=3.0<3.1
djangomaster: https://github.com/django/django/archive/master.tar.gz#egg=django
dj22: Django>=2.2,<3.0
dj30: Django>=3.0,<3.1
dj31: Django>=3.1,<3.2
djmaster: https://github.com/django/django/archive/master.tar.gz#egg=django
coverage
commands =
coverage run -m django test --settings=tests.settings {posargs}
coverage report
coverage xml

[testenv:py{36,37,38,39,py3}-dj{master}]
ignore_errors = true
ignore_outcome = true

[testenv:black]
basepython = python3
Expand Down

0 comments on commit b08ed6d

Please sign in to comment.