Skip to content

Commit d9d2384

Browse files
committed
Use GitHub Actions instead of Travis CI
1 parent 8f4e333 commit d9d2384

File tree

9 files changed

+86
-55
lines changed

9 files changed

+86
-55
lines changed

.github/workflows/lint.yml

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Check code quality
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
9+
steps:
10+
- uses: actions/checkout@v2
11+
12+
- name: Set up Python 3.9
13+
uses: actions/setup-python@v2
14+
with:
15+
python-version: 3.9
16+
17+
- name: Install dependencies
18+
run: |
19+
python -m pip install --upgrade pip
20+
pip install tox
21+
22+
- name: Run code quality tests with tox
23+
run: tox
24+
env:
25+
TOXENV: black,flake8,mypy,docs,manifest

.github/workflows/publish.yml

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Publish to PyPI
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: actions/checkout@v2
14+
15+
- name: Set up Python 3.9
16+
uses: actions/setup-python@v2
17+
with:
18+
python-version: 3.9
19+
20+
- name: Build wheel and source tarball
21+
run: |
22+
pip install wheel
23+
python setup.py sdist bdist_wheel
24+
25+
- name: Publish a Python distribution to PyPI
26+
uses: pypa/gh-action-pypi-publish@v1
27+
with:
28+
user: __token__
29+
password: ${{ secrets.PYPI_TOKEN }}

.github/workflows/test.yml

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Run tests
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
9+
strategy:
10+
matrix:
11+
python: [3.6, 3.7, 3.8, 3.9, pypy3]
12+
13+
steps:
14+
- uses: actions/checkout@v2
15+
16+
- name: Set up Python ${{ matrix.python }}
17+
uses: actions/setup-python@v2
18+
with:
19+
python-version: ${{ matrix.python-version }}
20+
21+
- name: Install dependencies
22+
run: |
23+
python -m pip install --upgrade pip
24+
pip install tox "poetry>=1.1,<2"
25+
poetry install
26+
27+
- name: Run unit tests with tox
28+
run: tox
29+
env:
30+
TOXENV: py
31+

.travis.yml

-40
This file was deleted.

MANIFEST.in

-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ include .editorconfig
1010
include .flake8
1111
include .mypy.ini
1212

13-
include codecov.yml
1413
include tox.ini
1514

1615
include poetry.lock

codecov.yml

-10
This file was deleted.

pyproject.toml

-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ black = [
5656
]
5757
flake8 = "^3.9"
5858
mypy = "0.910"
59-
codecov = "^2"
6059
sphinx = "^4.1"
6160
sphinx_rtd_theme = ">=0.5,<1"
6261
check-manifest = ">=0.46,<1"

setup.cfg

-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ test = pytest
66

77
[check-manifest]
88
ignore =
9-
codecov.yml
10-
.travis.yml
119
.pyup.yml
1210

1311
[tool:pytest]

tox.ini

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[tox]
2-
envlist = py3{6,7,8,9}, black, flake8, mypy, docs, manifest
2+
envlist = py{36,37,38,39,py3}, black, flake8, mypy, docs, manifest
33
isolated_build = true
44

55
[testenv:black]

0 commit comments

Comments
 (0)