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 99 workflow_dispatch :
1010
1111jobs :
12- tests :
12+ test :
1313 name : " Python ${{ matrix.python-version }}"
1414 runs-on : " ubuntu-latest"
1515 env :
@@ -34,17 +34,22 @@ jobs:
3434 - name : " Run tox targets for ${{ matrix.python-version }}"
3535 run : " python -m tox"
3636
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+ uses : aio-libs/prepare-coverage@v21.9.1
4240
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
4649 with :
47- fail_ci_if_error : true
50+ jobs : ${{ toJSON(needs) }}
51+ - name : Upload coverage
52+ uses : aio-libs/upload-coverage@v21.9.4
4853
4954 package :
5055 name : " Build & verify package"
Original file line number Diff line number Diff line change 2929endif
3030
3131test :
32- pytest tests
32+ coverage run -m pytest tests
33+ coverage xml
34+ coverage report
3335
3436install :
3537 pip install -U pre-commit
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ install_requires =
4141
4242[options.extras_require]
4343testing =
44- coverage
44+ coverage ==6.2
4545 hypothesis >= 5.7.1
4646 flaky >= 3.5.0
4747
@@ -51,6 +51,7 @@ pytest11 =
5151
5252[coverage:run]
5353source = pytest_asyncio
54+ branch = true
5455
5556[coverage:report]
5657show_missing = true
@@ -59,6 +60,7 @@ show_missing = true
5960addopts = -rsx --tb =short
6061testpaths = tests
6162asyncio_mode = auto
63+ junit_family =xunit2
6264filterwarnings = error
6365
6466[flake8]
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ skip_missing_interpreters = true
55
66[testenv]
77extras = testing
8- commands = coverage run -m pytest {posargs}
8+ commands = make test
99
1010[testenv:lint]
1111skip_install = true
You can’t perform that action at this time.
0 commit comments