Skip to content

Commit 193707d

Browse files
committed
Use GitHub Actions instead of Travis CI
1 parent 366058c commit 193707d

File tree

8 files changed

+94
-57
lines changed

8 files changed

+94
-57
lines changed

.github/workflows/lint.yml

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: 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.8
13+
uses: actions/setup-python@v2
14+
with:
15+
python-version: 3.8
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
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.8
16+
uses: actions/setup-python@v2
17+
with:
18+
python-version: 3.8
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@release/v1
27+
with:
28+
user: __token__
29+
password: ${{ secrets.PYPI_TOKEN }}

.github/workflows/test.yml

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: 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', '3.10', 'pypy3']
12+
13+
steps:
14+
- uses: actions/checkout@v2
15+
16+
- name: Set up Python ${{ matrix.python-version }}
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 tox-gh-actions
25+
26+
- name: Run unit tests with tox
27+
run: tox

.travis.yml

-40
This file was deleted.

MANIFEST.in

-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ include .coveragerc
99
include .editorconfig
1010
include .flake8
1111

12-
include codecov.yml
1312
include mypy.ini
1413
include tox.ini
1514

codecov.yml

-10
This file was deleted.

pyproject.toml

-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ black = [
4545
]
4646
flake8 = "^4.0"
4747
mypy = "0.930"
48-
codecov = "^2"
4948
sphinx = "^2.4"
5049
sphinx_rtd_theme = ">=0.4,<1"
5150
check-manifest = "0.40"

tox.ini

+13-5
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,28 @@
22
envlist = py3{6,7,8,9,10}, black, flake8, mypy, docs, manifest
33
isolated_build = true
44

5+
[gh-actions]
6+
python =
7+
3.6: py36
8+
3.7: py37
9+
3.8: py38
10+
3.9: py39
11+
3.10: py310
12+
513
[testenv:black]
6-
basepython = python3.9
14+
basepython = python3.8
715
deps = black==21.12b0
816
commands =
9-
black src tests setup.py -t py39 --check
17+
black src tests setup.py -t py38 --check
1018

1119
[testenv:flake8]
12-
basepython = python3.9
20+
basepython = python3.8
1321
deps = flake8>=4,<5
1422
commands =
1523
flake8 src tests setup.py
1624

1725
[testenv:mypy]
18-
basepython = python3.9
26+
basepython = python3.8
1927
deps = mypy==0.930
2028
commands =
2129
mypy src tests
@@ -29,7 +37,7 @@ commands =
2937
sphinx-build -b html -nEW docs docs/_build/html
3038

3139
[testenv:manifest]
32-
basepython = python3.9
40+
basepython = python3.8
3341
deps = check-manifest==0.40
3442
commands =
3543
check-manifest -v

0 commit comments

Comments
 (0)