Skip to content

Commit e7607f5

Browse files
committed
Swith to a Github action for CI testing
This is a basic initial version based on h11#89 and Hynek's Python in GitHub Actions article.
1 parent 70c88f0 commit e7607f5

File tree

3 files changed

+68
-66
lines changed

3 files changed

+68
-66
lines changed

.github/workflows/ci.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
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+
- 3.6
17+
- 3.7
18+
- 3.8
19+
20+
steps:
21+
- uses: actions/checkout@master
22+
- name: Set up Python ${{ matrix.python-version }}
23+
uses: actions/setup-python@v1
24+
with:
25+
python-version: ${{ matrix.python-version }}
26+
- name: Install tox
27+
run: |
28+
python -m pip install --upgrade pip setuptools
29+
pip install --upgrade tox tox-gh-actions
30+
- name: Initialize tox envs
31+
run: |
32+
tox --parallel auto --notest
33+
- name: Test with tox
34+
run: |
35+
tox --parallel 0
36+
37+
autobahn:
38+
runs-on: ubuntu-latest
39+
strategy:
40+
matrix:
41+
side: [client, server]
42+
43+
steps:
44+
- uses: actions/checkout@master
45+
- name: Set up Python 3.8
46+
uses: actions/setup-python@v1
47+
with:
48+
python-version: 3.8
49+
- name: Install tox
50+
run: |
51+
python -m pip install --upgrade pip
52+
pip install --upgrade tox
53+
- name: Initialize tox envs
54+
run: |
55+
tox --parallel auto --notest -e autobahn
56+
- name: Run autobahn
57+
run: |
58+
tox --parallel 0 -e autobahn
59+
env:
60+
SIDE: ${{ matrix.side }}

.travis.yml

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

tox.ini

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,25 @@
11
[tox]
2-
envlist = py36, py37, py38, pypy, format, mypy, lint, packaging, docs
2+
envlist = py36, py37, py38, pypy, format, mypy, lint, docs, packaging
3+
4+
[gh-actions]
5+
python =
6+
3.6: py36
7+
3.7: py37
8+
3.8: py38, format, mypy, lint, docs, package
9+
pypy: pypy
310

411
[testenv]
512
deps =
613
pytest==5.2.2
714
pytest-cov==2.8.1
8-
{env:CI_DEPS:}
9-
{env:EXTRA_DEPS:}
10-
passenv = CODECOV_TOKEN CI CI_* TRAVIS TRAVIS_*
1115
commands =
1216
pytest --cov=wsproto {posargs}
13-
{env:CI_COMMANDS:python -c ""}
1417

1518
[testenv:pypy]
1619
# temporarily disable coverage testing on PyPy due to performance problems
1720
commands = pytest {posargs}
1821

1922
[testenv:autobahn]
20-
deps =
21-
{env:EXTRA_DEPS:}
2223
changedir = {toxinidir}/compliance
2324
commands =
2425
python run-autobahn-tests.py {env:SIDE:}

0 commit comments

Comments
 (0)