Skip to content

Commit d28b826

Browse files
Bump codecov/codecov-action from 1 to 2.1.0 (#251)
* Bump codecov/codecov-action from 1 to 2.1.0 Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 1 to 2.1.0. - [Release notes](https://github.com/codecov/codecov-action/releases) - [Changelog](https://github.com/codecov/codecov-action/blob/master/CHANGELOG.md) - [Commits](codecov/codecov-action@v1...v2.1.0) --- updated-dependencies: - dependency-name: codecov/codecov-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> * Tune coverage report Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Andrew Svetlov <[email protected]>
1 parent 2f523ba commit d28b826

File tree

4 files changed

+22
-13
lines changed

4 files changed

+22
-13
lines changed

.github/workflows/main.yml

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99
workflow_dispatch:
1010

1111
jobs:
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/[email protected]
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/[email protected]
4853

4954
package:
5055
name: "Build & verify package"

Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@ else
2929
endif
3030

3131
test:
32-
pytest tests
32+
coverage run -m pytest tests
33+
coverage xml
34+
coverage report
3335

3436
install:
3537
pip install -U pre-commit

setup.cfg

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ install_requires =
4141

4242
[options.extras_require]
4343
testing =
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]
5353
source = pytest_asyncio
54+
branch = true
5455

5556
[coverage:report]
5657
show_missing = true
@@ -59,6 +60,7 @@ show_missing = true
5960
addopts = -rsx --tb=short
6061
testpaths = tests
6162
asyncio_mode = auto
63+
junit_family=xunit2
6264
filterwarnings = error
6365

6466
[flake8]

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ skip_missing_interpreters = true
55

66
[testenv]
77
extras = testing
8-
commands = coverage run -m pytest {posargs}
8+
commands = make test
99

1010
[testenv:lint]
1111
skip_install = true

0 commit comments

Comments
 (0)