Skip to content

Commit 0a836ee

Browse files
committed
switch from travis to GHA
1 parent a8e4aa7 commit 0a836ee

File tree

3 files changed

+64
-36
lines changed

3 files changed

+64
-36
lines changed

.github/workflows/tox.yaml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Tox CI
2+
3+
on:
4+
push:
5+
branches: [ "master" ]
6+
pull_request:
7+
branches: [ "master" ]
8+
9+
jobs:
10+
lint:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout repo
14+
uses: actions/checkout@v4
15+
16+
- name: Setup Python
17+
uses: actions/setup-python@v5
18+
with:
19+
python-version: "3.8"
20+
21+
- name: Install tox
22+
run: pip install --user tox
23+
24+
- name: Lint
25+
run: tox -e lint
26+
27+
build:
28+
runs-on: ubuntu-latest
29+
strategy:
30+
matrix:
31+
python-version: ["3.8", "3.9", "3.10", "3.11"]
32+
steps:
33+
- name: Checkout repo
34+
uses: actions/checkout@v4
35+
36+
- name: Setup Python
37+
uses: actions/setup-python@v5
38+
with:
39+
python-version: ${{ matrix.python-version }}
40+
41+
- name: Install tox
42+
run: pip install --user tox
43+
44+
- name: Select tox env
45+
id: tox-env
46+
run: echo tox-env=py${{ matrix.python-version }} | tr . '' >> ${GITHUB_OUTPUT}
47+
48+
- name: Test
49+
run: tox -e ${{ steps.tox-env.outputs.tox-env }}

.travis.yml

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

tox.ini

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,24 @@
11
[tox]
2-
envlist = py27,py36,lint
2+
envlist = py36,py38,py39,py310,py311,lint
33

44
[testenv]
55
deps = -r{toxinidir}/test-requirements.txt
66

7-
[testenv:py27]
8-
basepython = python2.7
9-
commands = python setup.py test
7+
[testenv:py38]
8+
basepython = python3.8
9+
commands = python3 setup.py test
1010

11-
[testenv:py36]
12-
basepython = python3.6
13-
commands = python setup.py test
11+
[testenv:py39]
12+
basepython = python3.9
13+
commands = python3 setup.py test
14+
15+
[testenv:py310]
16+
basepython = python3.10
17+
commands = python3 setup.py test
18+
19+
[testenv:py311]
20+
basepython = python3.11
21+
commands = python3 setup.py test
1422

1523
[testenv:lint]
1624
deps = -r{toxinidir}/test-requirements.txt

0 commit comments

Comments
 (0)