Skip to content

Commit

Permalink
Use GitHub Actions instead of Travis CI
Browse files Browse the repository at this point in the history
  • Loading branch information
Cito committed Aug 29, 2021
1 parent 8f4e333 commit d9d2384
Show file tree
Hide file tree
Showing 9 changed files with 86 additions and 55 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Check code quality

on: [push, pull_request]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

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

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tox
- name: Run code quality tests with tox
run: tox
env:
TOXENV: black,flake8,mypy,docs,manifest
29 changes: 29 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Publish to PyPI

on:
push:
tags:
- 'v*'

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

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

- name: Build wheel and source tarball
run: |
pip install wheel
python setup.py sdist bdist_wheel
- name: Publish a Python distribution to PyPI
uses: pypa/gh-action-pypi-publish@v1
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}
31 changes: 31 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Run tests

on: [push, pull_request]

jobs:
build:
runs-on: ubuntu-latest

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

steps:
- uses: actions/checkout@v2

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

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tox "poetry>=1.1,<2"
poetry install
- name: Run unit tests with tox
run: tox
env:
TOXENV: py

40 changes: 0 additions & 40 deletions .travis.yml

This file was deleted.

1 change: 0 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ include .editorconfig
include .flake8
include .mypy.ini

include codecov.yml
include tox.ini

include poetry.lock
Expand Down
10 changes: 0 additions & 10 deletions codecov.yml

This file was deleted.

1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ black = [
]
flake8 = "^3.9"
mypy = "0.910"
codecov = "^2"
sphinx = "^4.1"
sphinx_rtd_theme = ">=0.5,<1"
check-manifest = ">=0.46,<1"
Expand Down
2 changes: 0 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ test = pytest

[check-manifest]
ignore =
codecov.yml
.travis.yml
.pyup.yml

[tool:pytest]
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = py3{6,7,8,9}, black, flake8, mypy, docs, manifest
envlist = py{36,37,38,39,py3}, black, flake8, mypy, docs, manifest
isolated_build = true

[testenv:black]
Expand Down

0 comments on commit d9d2384

Please sign in to comment.