Skip to content

Commit

Permalink
- switch to GHA, add support for Python 3.9 and 3.10
Browse files Browse the repository at this point in the history
  • Loading branch information
dataflake committed Jun 27, 2022
1 parent 57c6bdb commit 4f0db2e
Show file tree
Hide file tree
Showing 29 changed files with 282 additions and 362 deletions.
39 changes: 39 additions & 0 deletions .editorconfig
@@ -0,0 +1,39 @@
# Generated from:
# https://github.com/zopefoundation/meta/tree/master/config/zope-product
#
# EditorConfig Configuration file, for more details see:
# http://EditorConfig.org
# EditorConfig is a convention description, that could be interpreted
# by multiple editors to enforce common coding conventions for specific
# file types

# top-most EditorConfig file:
# Will ignore other EditorConfig files in Home directory or upper tree level.
root = true


[*] # For All Files
# Unix-style newlines with a newline ending every file
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
# Set default charset
charset = utf-8
# Indent style default
indent_style = space
# Max Line Length - a hard line wrap, should be disabled
max_line_length = off

[*.{py,cfg,ini}]
# 4 space indentation
indent_size = 4

[*.{yml,zpt,pt,dtml,zcml}]
# 2 space indentation
indent_size = 2

[{Makefile,.gitmodules}]
# Tab indentation (no size specified, but view as 4 spaces)
indent_style = tab
indent_size = unset
tab_width = unset
63 changes: 63 additions & 0 deletions .github/workflows/tests.yml
@@ -0,0 +1,63 @@
# Generated from:
# https://github.com/zopefoundation/meta/tree/master/config/zope-product
name: tests

on:
push:
pull_request:
schedule:
- cron: '0 12 * * 0' # run once a week on Sunday
# Allow to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
build:
strategy:
# We want to see all failures:
fail-fast: false
matrix:
os:
- ubuntu
config:
# [Python version, tox env]
- ["3.9", "lint"]
- ["2.7", "py27"]
- ["3.5", "py35"]
- ["3.6", "py36"]
- ["3.7", "py37"]
- ["3.8", "py38"]
- ["3.9", "py39"]
- ["3.10", "py310"]
- ["3.9", "docs"]
- ["3.9", "coverage"]

runs-on: ${{ matrix.os }}-latest
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
name: ${{ matrix.config[1] }}
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.config[0] }}
- name: Pip cache
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ matrix.config[0] }}-${{ hashFiles('setup.*', 'tox.ini') }}
restore-keys: |
${{ runner.os }}-pip-${{ matrix.config[0] }}-
${{ runner.os }}-pip-
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tox
- name: Test
run: tox -e ${{ matrix.config[1] }}
- name: Coverage
if: matrix.config[1] == 'coverage'
run: |
pip install coveralls coverage-python-version
coveralls --service=github
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
31 changes: 21 additions & 10 deletions .gitignore
@@ -1,21 +1,32 @@
*.egg-info
# Generated from:
# https://github.com/zopefoundation/meta/tree/master/config/zope-product
*.dll
*.egg-info/
*.profraw
*.pyc
*.pyo
*$py.class
*.so
__pycache__
.coverage*
.coverage
.coverage.*
.eggs/
.installed.cfg
.mr.developer.cfg
.tox/
coverage.xml
inituser
.vscode/
__pycache__/
bin/
build/
eggs/
/etc
coverage.xml
develop-eggs/
develop/
dist/
docs/_build/
docs/_build
eggs/
etc/
lib/
lib64
log/
parts/
/var
pyvenv.cfg
testing.log
var/
27 changes: 27 additions & 0 deletions .meta.toml
@@ -0,0 +1,27 @@
# Generated from:
# https://github.com/zopefoundation/meta/tree/master/config/zope-product
[meta]
template = "zope-product"
commit-id = "1f787260c4188a0db7e5194765e9684ac716b914"

[python]
with-windows = false
with-pypy = false
with-future-python = false
with-legacy-python = true
with-docs = true
with-sphinx-doctests = false

[tox]
use-flake8 = true

[coverage]
fail-under = 95

[manifest]
additional-rules = [
"include buildout4.cfg",
"recursive-include src *.in",
"recursive-include src *.txt",
"recursive-include src *.zcml",
]
38 changes: 0 additions & 38 deletions .travis.yml

This file was deleted.

4 changes: 4 additions & 0 deletions CHANGES.rst
Expand Up @@ -3,6 +3,10 @@ Changelog

1.1 (unreleased)
----------------
- Added support for Python 3.9 and 3.10

- Switched to GitHub Actions for CI
(`#1 <https://github.com/dataflake/dataflake.wsgi.werkzeug/issues/1>`_)


1.0 (2019-04-24)
Expand Down
21 changes: 13 additions & 8 deletions MANIFEST.in
@@ -1,11 +1,16 @@
# Generated from:
# https://github.com/zopefoundation/meta/tree/master/config/zope-product
include *.rst
include *.cfg
exclude .*.cfg

recursive-include dataflake *
include buildout.cfg
include tox.ini

global-exclude *.pyc
global-exclude *.pyo
recursive-include docs *.py
recursive-include docs *.rst
recursive-include docs *.txt
recursive-include docs Makefile

include *.py
include tox.ini
recursive-include src *.py
include buildout4.cfg
recursive-include src *.in
recursive-include src *.txt
recursive-include src *.zcml
4 changes: 2 additions & 2 deletions README.rst
@@ -1,5 +1,5 @@
.. image:: https://travis-ci.com/dataflake/dataflake.wsgi.werkzeug.svg?branch=master
:target: https://travis-ci.com/dataflake/dataflake.wsgi.werkzeug
.. image:: https://github.com/dataflake/dataflake.wsgi.werkzeug/actions/workflows/tests.yml/badge.svg
:target: https://github.com/dataflake/dataflake.wsgi.werkzeug/actions/workflows/tests.yml

.. image:: https://coveralls.io/repos/github/dataflake/dataflake.wsgi.werkzeug/badge.svg?branch=master
:target: https://coveralls.io/github/dataflake/dataflake.wsgi.werkzeug?branch=master
Expand Down

0 comments on commit 4f0db2e

Please sign in to comment.