Skip to content

Commit fe63256

Browse files
authored
switch from Travis to GH actions (#162)
* switch from Travis to GH actions * bring back tox.ini * workflow with tox, publish workflow * add pypy and 2.7 * [workflows] add proper codecov action
1 parent d30aced commit fe63256

File tree

5 files changed

+96
-60
lines changed

5 files changed

+96
-60
lines changed

.github/workflows/main.yml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: Tests
2+
on:
3+
push:
4+
branches: [ master ]
5+
pull_request:
6+
branches: [ master ]
7+
8+
9+
jobs:
10+
tests:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
include:
16+
- python-version: "2.7"
17+
env:
18+
TOXENV: "msgpack"
19+
- python-version: "2.7"
20+
env:
21+
TOXENV: "json"
22+
- python-version: "pypy3"
23+
env:
24+
TOXENV: "msgpack"
25+
- python-version: "pypy3"
26+
env:
27+
TOXENV: "json"
28+
29+
- python-version: "3.6"
30+
env:
31+
TOXENV: "msgpack"
32+
- python-version: "3.6"
33+
env:
34+
TOXENV: "json"
35+
- python-version: "3.7"
36+
env:
37+
TOXENV: "msgpack"
38+
- python-version: "3.7"
39+
env:
40+
TOXENV: "json"
41+
- python-version: "3.8"
42+
env:
43+
TOXENV: "msgpack"
44+
- python-version: "3.8"
45+
env:
46+
TOXENV: "json"
47+
- python-version: "3.9"
48+
env:
49+
TOXENV: "msgpack"
50+
- python-version: "3.9"
51+
env:
52+
TOXENV: "json"
53+
54+
steps:
55+
- uses: actions/checkout@v2
56+
- name: Set up Python ${{ matrix.python-version }}
57+
uses: actions/setup-python@v2
58+
with:
59+
python-version: ${{ matrix.python-version }}
60+
61+
- name: Run tests
62+
env: ${{ matrix.env }}
63+
run: |
64+
pip install -U tox
65+
tox
66+
67+
- name: Upload to codecov
68+
uses: codecov/codecov-action@v2

.github/workflows/publish.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Publish
2+
on:
3+
release:
4+
types: [published]
5+
6+
jobs:
7+
publish:
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
- uses: actions/checkout@v2
12+
13+
- name: Set up Python 3
14+
uses: actions/setup-python@v2
15+
with:
16+
python-version: 3
17+
18+
- name: Build distribution
19+
run: |
20+
pip install -U setuptools wheel
21+
python setup.py sdist bdist_wheel
22+
23+
- name: Publish to PyPI
24+
uses: pypa/gh-action-pypi-publish@release/v1
25+
with:
26+
password: ${{ secrets.PYPI_TOKEN }}

.travis-workarounds.sh

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

.travis.yml

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

tox.ini

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44
# and then run "tox" from this directory.
55

66
[tox]
7-
envlist = py{27,py,35,36,37}-{json,msgpack}
7+
envlist = py{36,py3,37,38,39}-{json,msgpack}
88

99
[testenv]
1010
deps =
1111
-r{toxinidir}/requirements-base.txt
1212
-r{toxinidir}/requirements-test.txt
1313
msgpack: -r{toxinidir}/requirements.txt
1414
pypy-msgpack: -r{toxinidir}/requirements-pypy.txt
15-
commands = py.test --cov=scrapinghub --cov-report=
15+
commands = py.test --cov=scrapinghub --cov-report=xml

0 commit comments

Comments
 (0)