Skip to content

Commit 1f643a8

Browse files
committed
Travis CI → GitHub Actions
1 parent 1305d49 commit 1f643a8

File tree

4 files changed

+73
-25
lines changed

4 files changed

+73
-25
lines changed

.github/workflows/publish.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Publish
2+
on: [push]
3+
4+
jobs:
5+
publish:
6+
runs-on: ubuntu-latest
7+
if: startsWith(github.event.ref, 'refs/tags/')
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
16+
17+
- name: Check Tag
18+
id: check-release-tag
19+
run: |
20+
if [[ ${{ github.event.ref }} =~ ^refs/tags/[0-9]+[.][0-9]+[.][0-9]+(rc[0-9]+|[.]dev[0-9]+)?$ ]]; then
21+
echo ::set-output name=release_tag::true
22+
fi
23+
24+
- name: Publish to PyPI
25+
if: steps.check-release-tag.outputs.release_tag == 'true'
26+
run: |
27+
pip install --upgrade setuptools wheel twine
28+
python setup.py sdist bdist_wheel
29+
export TWINE_USERNAME=__token__
30+
export TWINE_PASSWORD=${{ secrets.PYPI_TOKEN }}
31+
twine upload dist/*

.github/workflows/tests.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Tests
2+
on: [push, pull_request]
3+
4+
jobs:
5+
tests:
6+
runs-on: ubuntu-latest
7+
strategy:
8+
matrix:
9+
include:
10+
- python-version: 2.7
11+
env:
12+
TOXENV: py
13+
- python-version: 3.4
14+
env:
15+
TOXENV: py
16+
- python-version: 3.5
17+
env:
18+
TOXENV: py
19+
- python-version: 3.6
20+
env:
21+
TOXENV: py
22+
- python-version: 3.7
23+
env:
24+
TOXENV: py
25+
26+
steps:
27+
- uses: actions/checkout@v2
28+
29+
- name: Set up Python ${{ matrix.python-version }}
30+
uses: actions/setup-python@v2
31+
with:
32+
python-version: ${{ matrix.python-version }}
33+
34+
- name: Run tests
35+
env: ${{ matrix.env }}
36+
run: |
37+
pip install -U tox
38+
tox
39+
40+
- name: Upload coverage report
41+
run: bash <(curl -s https://codecov.io/bash)

.travis.yml

Lines changed: 0 additions & 24 deletions
This file was deleted.

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[tox]
2-
envlist = py27, py34, py35, py36, py37
2+
envlist = py
33

44
[testenv]
55
deps=

0 commit comments

Comments
 (0)