Skip to content

Commit ffb931c

Browse files
authored
Merge pull request #113 from Gallaecio/github-actions
Travis CI → GitHub Actions
2 parents 0c47a64 + b9506ce commit ffb931c

File tree

4 files changed

+70
-25
lines changed

4 files changed

+70
-25
lines changed

.github/workflows/publish.yml

+31
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

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
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.5
14+
env:
15+
TOXENV: py
16+
- python-version: 3.6
17+
env:
18+
TOXENV: py
19+
- python-version: 3.7
20+
env:
21+
TOXENV: py
22+
23+
steps:
24+
- uses: actions/checkout@v2
25+
26+
- name: Set up Python ${{ matrix.python-version }}
27+
uses: actions/setup-python@v2
28+
with:
29+
python-version: ${{ matrix.python-version }}
30+
31+
- name: Run tests
32+
env: ${{ matrix.env }}
33+
run: |
34+
pip install -U tox
35+
tox
36+
37+
- name: Upload coverage report
38+
run: bash <(curl -s https://codecov.io/bash)

.travis.yml

-24
This file was deleted.

tox.ini

+1-1
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)