Skip to content

Commit d7b2275

Browse files
authored
Merge pull request #81 from pytest-dev/gha
Add GitHub Actions
2 parents 37616a6 + 882bf92 commit d7b2275

File tree

2 files changed

+104
-1
lines changed

2 files changed

+104
-1
lines changed

.github/workflows/ci.yml

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
tags:
8+
- v*
9+
pull_request:
10+
branches:
11+
- "*"
12+
13+
jobs:
14+
test:
15+
name: ${{ matrix.os.name }} ${{ matrix.python.name }} ${{ matrix.reactor.name }}
16+
runs-on: ${{ matrix.os.runs-on }}
17+
strategy:
18+
fail-fast: false
19+
matrix:
20+
os:
21+
- name: Linux
22+
runs-on: ubuntu-latest
23+
- name: Windows
24+
runs-on: windows-latest
25+
- name: macOS
26+
runs-on: macos-latest
27+
python:
28+
- name: CPython 2.7
29+
tox: py27
30+
action: 2.7
31+
- name: CPython 3.5
32+
tox: py35
33+
action: 3.5
34+
- name: CPython 3.6
35+
tox: py36
36+
action: 3.6
37+
- name: CPython 3.7
38+
tox: py37
39+
action: 3.7
40+
reactor:
41+
- name: default
42+
tox: default
43+
- name: Qt5
44+
tox: qt5
45+
- name: asyncio
46+
tox: asyncio
47+
exclude:
48+
- python:
49+
tox: py27
50+
reactor:
51+
tox: qt5
52+
- python:
53+
tox: py27
54+
reactor:
55+
tox: asyncio
56+
steps:
57+
- uses: actions/checkout@v2
58+
- name: Set up ${{ matrix.python.name }}
59+
uses: actions/setup-python@v1
60+
with:
61+
python-version: ${{ matrix.python.action }}
62+
architecture: x64
63+
- name: Install
64+
run: |
65+
pip install tox
66+
- name: Set TOXENV
67+
shell: python
68+
run: |
69+
import sys
70+
71+
toxenv = '${{ matrix.python.tox }}-${{ matrix.reactor.tox }}reactor'
72+
73+
if sys.platform == 'win32':
74+
toxenv = 'win-' + toxenv
75+
76+
print('::set-env name=TOXENV::{}'.format(toxenv))
77+
- name: Test
78+
run: |
79+
tox -v -e "${{ env['TOXENV'] }}"
80+
linting:
81+
name: Linting
82+
runs-on: ubuntu-latest
83+
strategy:
84+
matrix:
85+
python:
86+
- short: 37
87+
dotted: 3.7
88+
steps:
89+
- uses: actions/checkout@v2
90+
- name: Set up Python ${{ matrix.python.dotted }}
91+
uses: actions/setup-python@v1
92+
with:
93+
python-version: ${{ matrix.python.dotted }}
94+
architecture: x64
95+
- name: Install
96+
run: |
97+
pip install tox
98+
- name: Test
99+
run: |
100+
tox -v -e linting

testing/test_basic.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,10 @@ def test_async_fixture(testdir, cmd_opts):
334334
import pytest
335335
import pytest_twisted
336336
337-
@pytest_twisted.async_fixture(scope="function", params=["fs", "imap", "web"])
337+
@pytest_twisted.async_fixture(
338+
scope="function",
339+
params=["fs", "imap", "web"],
340+
)
338341
@pytest.mark.redgreenblue
339342
async def foo(request):
340343
d1, d2 = defer.Deferred(), defer.Deferred()

0 commit comments

Comments
 (0)