Skip to content

Commit 70cbdef

Browse files
committed
Travis -> GitHub Actions
1 parent 740af18 commit 70cbdef

File tree

3 files changed

+76
-20
lines changed

3 files changed

+76
-20
lines changed

.github/workflows/main.yml

+68
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
---
2+
name: CI
3+
4+
on:
5+
push:
6+
branches: ["master"]
7+
pull_request:
8+
branches: ["master"]
9+
workflow_dispatch:
10+
11+
jobs:
12+
tests:
13+
name: "Python ${{ matrix.python-version }}"
14+
runs-on: "ubuntu-latest"
15+
env:
16+
USING_COVERAGE: "3.6,3.7,3.8,3.9"
17+
18+
strategy:
19+
matrix:
20+
python-version: ["3.6", "3.7", "3.8", "3.9"]
21+
22+
steps:
23+
- uses: "actions/checkout@v2"
24+
- uses: "actions/setup-python@v2"
25+
with:
26+
python-version: "${{ matrix.python-version }}"
27+
- name: "Install dependencies"
28+
run: |
29+
set -xe
30+
python -VV
31+
python -m site
32+
python -m pip install --upgrade pip wheel poetry
33+
python -m pip install --upgrade coverage[toml] virtualenv tox tox-gh-actions
34+
- name: "Run tox targets for ${{ matrix.python-version }}"
35+
run: "python -m tox"
36+
37+
# We always use a modern Python version for combining coverage to prevent
38+
# parsing errors in older versions for modern code.
39+
- uses: "actions/setup-python@v2"
40+
with:
41+
python-version: "3.9"
42+
43+
- name: "Upload coverage to Codecov"
44+
if: "contains(env.USING_COVERAGE, matrix.python-version)"
45+
uses: "codecov/codecov-action@v1"
46+
with:
47+
fail_ci_if_error: true
48+
49+
package:
50+
name: "Build & verify package"
51+
runs-on: "ubuntu-latest"
52+
53+
steps:
54+
- uses: "actions/checkout@v2"
55+
- uses: "actions/setup-python@v2"
56+
with:
57+
python-version: "3.9"
58+
59+
- name: "Install poetry, check-wheel-content, and twine"
60+
run: "python -m pip install twine check-wheel-contents"
61+
- name: "Build package"
62+
run: "python setup.py sdist bdist_wheel"
63+
- name: "List result"
64+
run: "ls -l dist"
65+
- name: "Check wheel contents"
66+
run: "check-wheel-contents dist/*.whl"
67+
- name: "Check long_description"
68+
run: "python -m twine check dist/*"

.travis.yml

-20
This file was deleted.

tox.ini

+8
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,11 @@ skip_install = true
1313
commands =
1414
coverage combine
1515
coverage report
16+
17+
[gh-actions]
18+
python =
19+
3.6: py36
20+
3.7: py37
21+
3.8: py38
22+
3.9: py39, lint
23+
pypy3: pypy3

0 commit comments

Comments
 (0)