Skip to content

Commit 6e83b0a

Browse files
committed
Switch to a Github action for CI testing
This is a basic initial version based on the one used for h2. With thanks to @webknjaz for the initial example for h11.
1 parent 0d92213 commit 6e83b0a

File tree

3 files changed

+52
-27
lines changed

3 files changed

+52
-27
lines changed

.github/workflows/ci.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: ["master"]
6+
pull_request:
7+
branches: ["master"]
8+
9+
jobs:
10+
tox:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
max-parallel: 5
14+
matrix:
15+
python-version:
16+
- 2.7
17+
- 3.6
18+
- 3.7
19+
- 3.8
20+
- pypy
21+
- pypy3
22+
23+
steps:
24+
- uses: actions/checkout@v2
25+
- uses: actions/setup-python@v2
26+
with:
27+
python-version: ${{ matrix.python-version }}
28+
- name: Install tox
29+
run: |
30+
python -m pip install --upgrade pip setuptools
31+
pip install --upgrade tox tox-gh-actions
32+
- name: Initialize tox envs
33+
run: |
34+
tox --parallel auto --notest
35+
- name: Test with tox
36+
run: |
37+
tox --parallel 0
38+
- uses: codecov/codecov-action@v1
39+
with:
40+
file: ./coverage.xml

.travis.yml

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

tox.ini

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,18 @@
11
[tox]
2-
envlist = format, py27, py35, py36, py37, py38, pypy
2+
envlist = format, py27, py36, py37, py38, pypy, pypy3
3+
4+
[gh-actions]
5+
python =
6+
2.7: py27
7+
3.6: py36
8+
3.7: py37
9+
3.8: py38, format
10+
pypy: pypy
11+
pypy3: pypy3
312

413
[testenv]
5-
deps= -r{toxinidir}/test-requirements.txt
6-
commands= py.test --cov=h11 --cov-config=.coveragerc h11
14+
deps = -r{toxinidir}/test-requirements.txt
15+
commands = pytest --cov=h11 --cov-config=.coveragerc h11
716

817
[testenv:format]
918
basepython = python3.7

0 commit comments

Comments
 (0)