Skip to content

Commit

Permalink
Merge bf1f9aa into 3398627
Browse files Browse the repository at this point in the history
  • Loading branch information
jugmac00 committed Jan 23, 2021
2 parents 3398627 + bf1f9aa commit b1e9abf
Show file tree
Hide file tree
Showing 8 changed files with 85 additions and 47 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: CI

# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events
push:
pull_request:
schedule:
- cron: '0 12 * * 0' # run once a week on Sunday

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
tests:
name: "Python ${{ matrix.python-version }}"
runs-on: "ubuntu-latest"

strategy:
matrix:
python-version: ["3.6", "3.7", "3.8", "3.9", "pypy3"]

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: "actions/checkout@v2"
- uses: "actions/setup-python@v2"
with:
python-version: "${{ matrix.python-version }}"
- name: "Install dependencies"
run: |
set -xe
python -VV
python -m site
python -m pip install --upgrade pip setuptools wheel
python -m pip install --upgrade virtualenv tox tox-gh-actions
- name: "Run tox targets for ${{ matrix.python-version }}"
run: "python -m tox"

- name: "Report to coveralls"
# coverage is only created in the py39 environment
# --service=github is a workaround for bug
# https://github.com/coveralls-clients/coveralls-python/issues/251
if: "matrix.python-version == '3.9'"
run: |
pip install coveralls
coveralls --service=github
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
13 changes: 11 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
repos:
- repo: https://github.com/psf/black
rev: stable
rev: 20.8b1
hooks:
- id: black
language_version: python3.7
args: [--line-length=80]
- repo: https://gitlab.com/pycqa/flake8
rev: "3.8.4"
hooks:
- id: flake8
- repo: https://github.com/asottile/pyupgrade
rev: v2.7.4
hooks:
- id: pyupgrade
args: [--py36-plus]
21 changes: 0 additions & 21 deletions .travis.yml

This file was deleted.

4 changes: 4 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ CHANGES

- Drop support for Python 3.4 and 3.5.

- Add support for Python 3.9.

- Use GitHub Actions for CI.


0.3 (2020-04-26)
----------------
Expand Down
1 change: 1 addition & 0 deletions CREDITS.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ CREDITS
=======

* Henri Hulski (author)
* Jürgen Gmach (CI)
15 changes: 0 additions & 15 deletions pyproject.toml

This file was deleted.

1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"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",
],
install_requires=["morepath >= 0.19", "cerberus >= 1.3.2, < 2.0.0"],
Expand Down
27 changes: 18 additions & 9 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
[tox]
envlist = py36, py37, py38, pypy3, pep8, coverage
skipsdist = True
envlist = py36, py37, py38, py39, pypy3, pre-commit, coverage
skip_missing_interpreters = True

[testenv]
Expand All @@ -9,16 +8,26 @@ extras = test

commands = pytest {posargs}

[testenv:pep8]
basepython = python3.7
extras = pep8

commands = flake8 more
black --check .
[testenv:pre-commit]
deps = pre-commit
commands = pre-commit run --all-files

[testenv:coverage]
basepython = python3.7
basepython = python3
extras = test
coverage

commands = pytest --cov --cov-fail-under=100 {posargs}

[gh-actions]
python =
3.6: py36
3.7: py37
3.8: py38
3.9: py39, pre-commit, mypy, coverage

[flake8]
max-line-length = 88
ignore =
E231 # clashes with black
W503

0 comments on commit b1e9abf

Please sign in to comment.