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

Migrate from Travis to GitHub actions #43

Merged
merged 6 commits into from
Dec 21, 2020
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
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-ical'
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-ical/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') }}
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

- name: Upload coverage
uses: codecov/codecov-action@v1
with:
name: Python ${{ matrix.python-version }}
10 changes: 10 additions & 0 deletions .prospector.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
ignore-paths:
- docs

pep8:
options:
max-line-length: 142

pylint:
disable:
- import-error
39 changes: 0 additions & 39 deletions .travis.yml

This file was deleted.

9 changes: 9 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,15 @@ Changes
=======


1.7.2 (2020-12-16)
------------------

- Add support for Python 3.9. [aleksihakli]
- Add support for Django 3.1. [aleksihakli]
- Add tox QA with black and prospector. [aleksihakli]
- Migrate from Travis to GitHub Actions. [aleksihakli]


1.7.1 (2020-05-09)
------------------

Expand Down
13 changes: 9 additions & 4 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
django-ical
===========

|pypi| |docs| |build| |jazzband|
|pypi| |docs| |build| |coverage| |jazzband|

django-ical is a simple library/framework for creating
`iCal <http://www.ietf.org/rfc/rfc2445.txt>`_
Expand All @@ -24,7 +24,7 @@ Documentation

Documentation is hosted on Read the Docs:

http://django-ical.readthedocs.io/en/latest/
https://django-ical.readthedocs.io/en/latest/


.. |pypi| image:: https://img.shields.io/pypi/v/django-ical.svg
Expand All @@ -36,8 +36,13 @@ http://django-ical.readthedocs.io/en/latest/
:scale: 100%
:target: http://django-ical.readthedocs.io/en/latest/?badge=latest

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

.. |coverage| image:: https://codecov.io/gh/jazzband/django-ical/branch/master/graph/badge.svg
:target: https://codecov.io/gh/jazzband/django-ical
:alt: Coverage

.. |jazzband| image:: https://jazzband.co/static/img/badge.svg
:target: https://jazzband.co/
Expand Down
2 changes: 1 addition & 1 deletion django_ical/feedgenerator.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ class ICal20Feed(SyndicationFeed):

mime_type = "text/calendar; charset=utf8"

def write(self, outfile, encoding):
def write(self, outfile, encoding): # pylint: disable=unused-argument
"""
Writes the feed to the specified file in the
specified encoding.
Expand Down
2 changes: 1 addition & 1 deletion django_ical/tests/test_feed.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ def item_organizer(self, obj):
return organizer

def item_attendee(self, obj):
""" All calendars support ATTENDEE attribute, however, at this time, Apple calendar (desktop & iOS) and Outlook
"""All calendars support ATTENDEE attribute, however, at this time, Apple calendar (desktop & iOS) and Outlook
display event attendees, while Google does not. For SUBSCRIBED calendars it seems that it is not possible to
use the default method to respond. As an alternative, you may review adding custom links to your description
or setting up something like CalDav with authentication, which can enable the ability for attendees to respond
Expand Down
4 changes: 3 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"Framework :: Django",
"Framework :: Django :: 2.2",
"Framework :: Django :: 3.0",
"Framework :: Django :: 3.1",
"Intended Audience :: Developers",
"Intended Audience :: System Administrators",
"License :: OSI Approved :: MIT License",
Expand All @@ -34,11 +35,12 @@
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Topic :: Software Development :: Libraries :: Python Modules",
],
install_requires=["Django>=1.11", "icalendar>=4.0.3", "django-recurrence>=1.10.0"],
install_requires=["Django>=2.2", "icalendar>=4.0.3", "django-recurrence>=1.10.0"],
packages=find_packages(),
test_suite="tests.main",
use_scm_version=True,
Expand Down
42 changes: 25 additions & 17 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,33 +1,41 @@
[tox]
envlist =
py{36,37,38,py3}-django{22,30,master}
py39-qa
py{36,37,38,39}-dj{22,30,31,master}

[travis]
[gh-actions]
python =
3.6: py36
3.7: py37
3.8: py38
3.9: py39
pypy3: pypy3

[travis:env]
DJANGO =
2.1: django21
2.2: django22
master: djangomaster

[testenv]
ignore_errors = true
deps =
coverage==4.5.4
prospector==1.1.7
black==19.3b0
django111: django>=1.11,<1.12
django22: django>=2.2,<2.3
django30: django>=3.0,<3.1
djangomaster: https://github.com/django/django/archive/master.tar.gz
coverage==5.3
dj22: django>=2.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
commands =
coverage run setup.py test
coverage report -m
{py36,py37}: prospector
{py36,py37}: black -t py36 --check --diff django_ical
setenv =
PYTHONDONTWRITEBYTECODE=1

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

[testenv:py39-qa]
ignore_errors = true
basepython = python3.9
deps =
black==20.8b1
prospector==1.3.1
skip_install = true
commands =
prospector
black -t py36 --check --diff django_ical