Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump codecov/codecov-action from 1 to 2.1.0 #251

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
25 changes: 15 additions & 10 deletions .github/workflows/main.yml
Expand Up @@ -9,7 +9,7 @@ on:
workflow_dispatch:

jobs:
tests:
test:
name: "Python ${{ matrix.python-version }}"
runs-on: "ubuntu-latest"
env:
Expand All @@ -34,17 +34,22 @@ jobs:
- name: "Run tox targets for ${{ matrix.python-version }}"
run: "python -m tox"

# We always use a modern Python version for combining coverage to prevent
# parsing errors in older versions for modern code.
- uses: "actions/setup-python@v2"
with:
python-version: "3.9"
- name: Prepare coverage artifact
if: ${{ contains(env.USING_COVERAGE, matrix.python-version) }}
uses: aio-libs/prepare-coverage@v21.9.1

- name: "Upload coverage to Codecov"
if: "contains(env.USING_COVERAGE, matrix.python-version)"
uses: "codecov/codecov-action@v1"
check:
name: Check
if: always()
needs: [test]
runs-on: ubuntu-latest
steps:
- name: Decide whether the needed jobs succeeded or failed
uses: re-actors/alls-green@release/v1
with:
fail_ci_if_error: true
jobs: ${{ toJSON(needs) }}
- name: Upload coverage
uses: aio-libs/upload-coverage@v21.9.4

package:
name: "Build & verify package"
Expand Down
4 changes: 3 additions & 1 deletion Makefile
Expand Up @@ -29,7 +29,9 @@ else
endif

test:
pytest tests
coverage run -m pytest tests
coverage xml
coverage report

install:
pip install -U pre-commit
Expand Down
4 changes: 3 additions & 1 deletion setup.cfg
Expand Up @@ -41,7 +41,7 @@ install_requires =

[options.extras_require]
testing =
coverage
coverage==6.2
hypothesis >= 5.7.1
flaky >= 3.5.0

Expand All @@ -51,6 +51,7 @@ pytest11 =

[coverage:run]
source = pytest_asyncio
branch = true

[coverage:report]
show_missing = true
Expand All @@ -59,6 +60,7 @@ show_missing = true
addopts = -rsx --tb=short
testpaths = tests
asyncio_mode = auto
junit_family=xunit2
filterwarnings = error

[flake8]
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Expand Up @@ -5,7 +5,7 @@ skip_missing_interpreters = true

[testenv]
extras = testing
commands = coverage run -m pytest {posargs}
commands = make test

[testenv:lint]
skip_install = true
Expand Down