Skip to content

Commit

Permalink
Push coverage report only once (#88)
Browse files Browse the repository at this point in the history
* Push codecov report only once
  • Loading branch information
chinskiy authored Apr 18, 2024
1 parent 112294e commit f777b2d
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 2 deletions.
22 changes: 21 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,31 @@ jobs:
TOXENV: ${{ matrix.tox-env }}
run: |
tox -v
codecov:
runs-on: ubuntu-latest
needs: test
steps:
- uses: actions/checkout@v4

- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: '3.12'

- name: Install Dependencies
run: |
python -m pip install --upgrade pip setuptools tox
- name: Run tests
env:
TOXENV: codecov
run: |
tox -v
- name: Upload coverage
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
name: Python-${{ matrix.python-version }}
fail_ci_if_error: true

lint:
Expand Down
5 changes: 4 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ passenv =
COVERAGE_ARGS
GITHUB_*
commands =
make coverage
make test

[testenv:flake8]
commands = make flake8
Expand All @@ -32,3 +32,6 @@ deps = flake8==7.0.0
[testenv:isort]
commands = make isort_check_only
deps = isort==5.13.2

[testenv:codecov]
commands = make coverage

0 comments on commit f777b2d

Please sign in to comment.