Skip to content

Commit

Permalink
Activate GH actions. (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Howitz authored Nov 17, 2020
1 parent 815752c commit 56581e9
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 57 deletions.
42 changes: 22 additions & 20 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,48 +2,50 @@ name: run tests

on:
push:
pull_request:
schedule:
- cron: '* * * * 0' # run once a week (sunday)
- cron: '0 12 * * 0' # run once a week on Sunday

jobs:
build:
strategy:
matrix:
python-version:
- "2.7"
- "3.5"
- "3.6"
- "3.7"
- "3.8"
- "3.9"
- "pypy2"
- "pypy3"
include:
- python-version: "3.8"
env:
- lint
- coverage
config:
# [name, Python version, tox env]
- ["lint", "3.8", "lint"]
- ["2.7", "2.7", "py27"]
- ["3.5", "3.5", "py35"]
- ["3.6", "3.6", "py36"]
- ["3.7", "3.7", "py37"]
- ["3.8", "3.8", "py38"]
- ["3.9", "3.9", "py39"]
- ["pypy2", "pypy2", "pypy"]
- ["pypy3", "pypy3", "pypy3"]
- ["coverage", "3.8", "coverage"]

runs-on: ubuntu-latest
name: ${{ matrix.config[0] }}
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
python-version: ${{ matrix.config[1] }}
- name: Pip cache
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles(setup.*', 'tox.ini') }}
key: ${{ runner.os }}-pip-${{ hashFiles('setup.*', 'tox.ini') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install coveralls
pip install tox coveralls
- name: Test
run: tox -e {{ matrix.env || 'py'}}
run: tox -e ${{ matrix.config[2] }}
- name: Coverage
if: matrix.config[1] == 'coverage'
run: coveralls
if: {{ matrix.env == 'coverage'}}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
34 changes: 0 additions & 34 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
2.4 (unreleased)
================

- Add support for Python 3.8.
- Add support for Python 3.8 and 3.9.

- Drop support for Python 3.4.

Expand Down
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
:target: https://pypi.org/project/zope.browser/
:alt: Supported Python versions

.. image:: https://travis-ci.com/zopefoundation/zope.browser.svg?branch=master
:target: https://travis-ci.com/zopefoundation/zope.browser
.. image:: https://github.com/zopefoundation/zope.browser/workflows/run%20tests/badge.svg
:target: https://github.com/zopefoundation/zope.browser/actions?query=workflow%3A%22run+tests%22

.. image:: https://coveralls.io/repos/github/zopefoundation/zope.browser/badge.svg?branch=master
:target: https://coveralls.io/github/zopefoundation/zope.browser?branch=master
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ def read(*rnames):
'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',
'Natural Language :: English',
Expand Down
1 change: 1 addition & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ envlist =
py36,
py37,
py38,
py39,
pypy3,
coverage

Expand Down

0 comments on commit 56581e9

Please sign in to comment.