File tree Expand file tree Collapse file tree 4 files changed +22
-13
lines changed Expand file tree Collapse file tree 4 files changed +22
-13
lines changed Original file line number Diff line number Diff line change 9
9
workflow_dispatch :
10
10
11
11
jobs :
12
- tests :
12
+ test :
13
13
name : " Python ${{ matrix.python-version }}"
14
14
runs-on : " ubuntu-latest"
15
15
env :
@@ -34,17 +34,22 @@ jobs:
34
34
- name : " Run tox targets for ${{ matrix.python-version }}"
35
35
run : " python -m tox"
36
36
37
- # We always use a modern Python version for combining coverage to prevent
38
- # parsing errors in older versions for modern code.
39
- - uses : " actions/setup-python@v2"
40
- with :
41
- python-version : " 3.9"
37
+ - name : Prepare coverage artifact
38
+ if : ${{ contains(env.USING_COVERAGE, matrix.python-version) }}
39
+
42
40
43
- - name : " Upload coverage to Codecov"
44
- if : " contains(env.USING_COVERAGE, matrix.python-version)"
45
- uses : " codecov/codecov-action@v1"
41
+ check :
42
+ name : Check
43
+ if : always()
44
+ needs : [test]
45
+ runs-on : ubuntu-latest
46
+ steps :
47
+ - name : Decide whether the needed jobs succeeded or failed
48
+ uses : re-actors/alls-green@release/v1
46
49
with :
47
- fail_ci_if_error : true
50
+ jobs : ${{ toJSON(needs) }}
51
+ - name : Upload coverage
52
+
48
53
49
54
package :
50
55
name : " Build & verify package"
Original file line number Diff line number Diff line change 29
29
endif
30
30
31
31
test :
32
- pytest tests
32
+ coverage run -m pytest tests
33
+ coverage xml
34
+ coverage report
33
35
34
36
install :
35
37
pip install -U pre-commit
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ install_requires =
41
41
42
42
[options.extras_require]
43
43
testing =
44
- coverage
44
+ coverage ==6.2
45
45
hypothesis >= 5.7.1
46
46
flaky >= 3.5.0
47
47
@@ -51,6 +51,7 @@ pytest11 =
51
51
52
52
[coverage:run]
53
53
source = pytest_asyncio
54
+ branch = true
54
55
55
56
[coverage:report]
56
57
show_missing = true
@@ -59,6 +60,7 @@ show_missing = true
59
60
addopts = -rsx --tb =short
60
61
testpaths = tests
61
62
asyncio_mode = auto
63
+ junit_family =xunit2
62
64
filterwarnings = error
63
65
64
66
[flake8]
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ skip_missing_interpreters = true
5
5
6
6
[testenv]
7
7
extras = testing
8
- commands = coverage run -m pytest {posargs}
8
+ commands = make test
9
9
10
10
[testenv:lint]
11
11
skip_install = true
You can’t perform that action at this time.
0 commit comments