Skip to content

Commit

Permalink
Merge pull request #211 from Gallaecio/github-actions
Browse files Browse the repository at this point in the history
Switch to GitHub Actions
  • Loading branch information
wRAR authored Mar 5, 2021
2 parents 8c9b25a + 18149ca commit da3453e
Show file tree
Hide file tree
Showing 6 changed files with 139 additions and 54 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Checks
on: [push, pull_request]

jobs:
checks:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- python-version: 3.8
env:
TOXENV: security
- python-version: 3.8
env:
TOXENV: flake8
- python-version: 3.8
env:
TOXENV: pylint
- python-version: 3.8 # Keep in sync with .readthedocs.yml
env:
TOXENV: docs

steps:
- uses: actions/checkout@v2

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Run check
env: ${{ matrix.env }}
run: |
pip install -U tox
tox
31 changes: 31 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Publish
on: [push]

jobs:
publish:
runs-on: ubuntu-latest
if: startsWith(github.event.ref, 'refs/tags/')

steps:
- uses: actions/checkout@v2

- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3

- name: Check Tag
id: check-release-tag
run: |
if [[ ${{ github.event.ref }} =~ ^refs/tags/[0-9]+[.][0-9]+[.][0-9]+(rc[0-9]+|[.]dev[0-9]+)?$ ]]; then
echo ::set-output name=release_tag::true
fi
- name: Publish to PyPI
if: steps.check-release-tag.outputs.release_tag == 'true'
run: |
pip install --upgrade setuptools wheel twine
python setup.py sdist bdist_wheel
export TWINE_USERNAME=__token__
export TWINE_PASSWORD=${{ secrets.PYPI_TOKEN }}
twine upload dist/*
53 changes: 53 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Tests
on: [push, pull_request]

jobs:
tests:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- python-version: 2.7
env:
TOXENV: py
- python-version: pypy-2.7
env:
TOXENV: pypy
- python-version: 3.5
env:
TOXENV: py
- python-version: 3.6
env:
TOXENV: py
- python-version: 3.7
env:
TOXENV: py
- python-version: 3.8
env:
TOXENV: py
- python-version: pypy3
env:
TOXENV: pypy

steps:
- uses: actions/checkout@v2

- name: Install system libraries
if: contains(matrix.python-version, 'pypy')
run: |
sudo apt-get update
sudo apt-get install libxml2-dev libxslt-dev
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Run tests
env: ${{ matrix.env }}
run: |
pip install -U tox
tox
- name: Upload coverage report
run: bash <(curl -s https://codecov.io/bash)
14 changes: 14 additions & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
version: 2
formats: all
sphinx:
configuration: docs/conf.py
fail_on_warning: true
build:
image: latest
python:
# For available versions, see:
# https://docs.readthedocs.io/en/stable/config-file/v2.html#build-image
version: 3.8 # Keep in sync with .github/workflows/checks.yml
install:
- requirements: docs/requirements.txt
- path: .
54 changes: 0 additions & 54 deletions .travis.yml

This file was deleted.

6 changes: 6 additions & 0 deletions pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ persistent=no
[MESSAGES CONTROL]
disable=bad-continuation,
c-extension-no-member,
deprecated-method,
fixme,
import-error,
import-outside-toplevel,
invalid-name,
line-too-long,
missing-class-docstring,
Expand All @@ -19,6 +22,9 @@ disable=bad-continuation,
super-with-arguments, # Required for Python 2 support
too-few-public-methods,
too-many-arguments,
too-many-public-methods,
unidiomatic-typecheck,
unused-argument,
useless-object-inheritance, # Required for Python 2 support
wrong-import-order,
wrong-import-position

0 comments on commit da3453e

Please sign in to comment.