Skip to content

Commit

Permalink
Merge pull request #177 from scality/feature/add-codecov
Browse files Browse the repository at this point in the history
Upload coverage to codecov.io
  • Loading branch information
tcarmet committed Apr 25, 2024
2 parents ddbdfa1 + c86b580 commit 7ea1655
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 1 deletion.
18 changes: 18 additions & 0 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@ jobs:
- run: tox -e tests-api-mock
- run: tox -e coverage-report
- run: tox -e tests-server
- name: Upload coverage reports to Codecov
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: ${{ github.repository }}
flags: unittests,server,api-mock

tests-noqueue:
runs-on: ubuntu-20.04
Expand All @@ -51,6 +57,12 @@ jobs:
- name: Install tox
run: pip install tox
- run: tox -e tests-noqueue
- name: Upload coverage reports to Codecov
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: ${{ github.repository }}
flags: tests-noqueue

all-tests:
runs-on: ubuntu-20.04
Expand All @@ -67,6 +79,12 @@ jobs:
- name: Install tox
run: pip install tox
- run: tox -e tests
- name: Upload coverage reports to Codecov
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: ${{ github.repository }}
flags: all-tests

lint:
runs-on: ubuntu-20.04
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,5 @@ settings.yml
.coverage
.pytest_cache/
build/
.env
coverage.xml
3 changes: 2 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ commands = flake8 bert_e/
[testenv:utests]
deps =
pip==22.3.1
commands = pytest bert_e/tests/unit/ {posargs}
pytest-cov==5.0.0
commands = pytest bert_e/tests/unit/ --cov=bert_e --cov-report=xml {posargs}

[testenv:tests-api-mock]
deps =
Expand Down

0 comments on commit 7ea1655

Please sign in to comment.