Skip to content

Commit c8b9a28

Browse files
committed
GitHub Action for running tests
1 parent 3274cba commit c8b9a28

File tree

3 files changed

+55
-4
lines changed

3 files changed

+55
-4
lines changed

.github/workflows/testsuite.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0
2+
# For details: https://github.com/nedbat/coveragepy/blob/master/NOTICE.txt
3+
4+
name: "Test Suite"
5+
6+
on:
7+
push:
8+
branches: ["master"]
9+
pull_request:
10+
branches: ["master"]
11+
workflow_dispatch:
12+
13+
jobs:
14+
tests:
15+
name: "Python ${{ matrix.python-version }} on ${{ matrix.os }}"
16+
runs-on: "${{ matrix.os }}"
17+
18+
strategy:
19+
matrix:
20+
os: [ubuntu-latest, macos-latest, windows-latest]
21+
python-version: ["2.7", "3.5", "3.6", "3.7", "3.8", "3.9", "pypy3"]
22+
exclude:
23+
# Windows PyPy doesn't seem to work?
24+
- os: windows-latest
25+
python-version: "pypy3"
26+
fail-fast: false
27+
28+
steps:
29+
- uses: "actions/checkout@v2"
30+
- uses: "actions/setup-python@v2"
31+
with:
32+
python-version: "${{ matrix.python-version }}"
33+
34+
- name: "Install Visual C++ for Python 2.7"
35+
if: runner.os == 'Windows'
36+
run: |
37+
choco install vcpython27 -f -y
38+
39+
- name: "Install dependencies"
40+
shell: bash
41+
run: |
42+
set -xe
43+
python -VV
44+
python -m site
45+
python -m pip install -r requirements/ci.pip
46+
47+
- name: "Run tox targets for ${{ matrix.python-version }}"
48+
shell: bash
49+
run: |
50+
python -m tox

requirements/ci.pip

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
-r tox.pip
66
-r pytest.pip
77
-r wheel.pip
8-
tox-travis==0.12
8+
tox-gh-actions==2.2.0

tox.ini

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,12 +84,13 @@ commands =
8484
twine check dist/*
8585
python -m pylint --notes= -j 4 {env:LINTABLE}
8686

87-
[travis]
88-
#2.7: py27, lint
87+
[gh-actions]
8988
python =
9089
2.7: py27
9190
3.5: py35
9291
3.6: py36
9392
3.7: py37
93+
3.8: py38
94+
3.9: py39
9495
pypy: pypy
95-
pypy3.5: pypy3
96+
pypy3: pypy3

0 commit comments

Comments
 (0)