mirror of
https://github.com/Second-Hand-Friends/kleinanzeigen-bot.git
synced 2026-03-12 10:31:50 +01:00
ci: publish code coverage reports
This commit is contained in:
30
.github/workflows/build.yml
vendored
30
.github/workflows/build.yml
vendored
@@ -261,6 +261,36 @@ jobs:
|
|||||||
docker push ghcr.io/$image_name
|
docker push ghcr.io/$image_name
|
||||||
|
|
||||||
|
|
||||||
|
- name: Upload unit-test coverage to Codecov
|
||||||
|
uses: codecov/codecov-action@v5 # https://github.com/codecov/codecov-action
|
||||||
|
if: ${{ github.ref_name == 'main' || github.event_name == 'pull_request' }}
|
||||||
|
with:
|
||||||
|
files: .temp/coverage-unit.xml
|
||||||
|
flags: unit-tests
|
||||||
|
env_vars: OS,PYTHON
|
||||||
|
name: gha-u-${{ matrix.PYTHON_VERSION }}-${{ matrix.os }}
|
||||||
|
env:
|
||||||
|
OS: ${{ matrix.os }}
|
||||||
|
PYTHON: ${{ matrix.PYTHON_VERSION }}
|
||||||
|
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
||||||
|
slug: ${{ github.repository }}
|
||||||
|
|
||||||
|
|
||||||
|
- name: Upload integration-test coverage to Codecov
|
||||||
|
uses: codecov/codecov-action@v5 # https://github.com/codecov/codecov-action
|
||||||
|
if: ${{ github.ref_name == 'main' || github.event_name == 'pull_request' }}
|
||||||
|
with:
|
||||||
|
files: .temp/coverage-integration.xml
|
||||||
|
flags: integration-tests
|
||||||
|
env_vars: OS,PYTHON
|
||||||
|
name: gha-i-${{ matrix.PYTHON_VERSION }}-${{ matrix.os }}
|
||||||
|
env:
|
||||||
|
OS: ${{ matrix.os }}
|
||||||
|
PYTHON: ${{ matrix.PYTHON_VERSION }}
|
||||||
|
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
||||||
|
slug: ${{ github.repository }}
|
||||||
|
|
||||||
|
|
||||||
###########################################################
|
###########################################################
|
||||||
publish-release:
|
publish-release:
|
||||||
###########################################################
|
###########################################################
|
||||||
|
|||||||
@@ -3,7 +3,8 @@
|
|||||||
[](https://github.com/Second-Hand-Friends/kleinanzeigen-bot/actions/workflows/build.yml)
|
[](https://github.com/Second-Hand-Friends/kleinanzeigen-bot/actions/workflows/build.yml)
|
||||||
[](LICENSE.txt)
|
[](LICENSE.txt)
|
||||||
[](CODE_OF_CONDUCT.md)
|
[](CODE_OF_CONDUCT.md)
|
||||||
[](https://codeclimate.com/github/Second-Hand-Friends/kleinanzeigen-bot/maintainability)
|
[](https://codecov.io/github/Second-Hand-Friends/kleinanzeigen-bot)
|
||||||
|
<!--[](https://qlty.sh/gh/Second-Hand-Friends/projects/kleinanzeigen-bot)-->
|
||||||
|
|
||||||
**Feedback and high-quality pull requests are highly welcome!**
|
**Feedback and high-quality pull requests are highly welcome!**
|
||||||
|
|
||||||
|
|||||||
12
codecov.yml
Normal file
12
codecov.yml
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
# https://docs.codecov.com/docs/codecovyml-reference
|
||||||
|
# https://json.schemastore.org/codecov.json
|
||||||
|
codecov:
|
||||||
|
branch: main
|
||||||
|
require_ci_to_pass: true
|
||||||
|
notify:
|
||||||
|
wait_for_ci: true
|
||||||
|
|
||||||
|
coverage:
|
||||||
|
precision: 2
|
||||||
|
round: down
|
||||||
|
range: "65...100"
|
||||||
@@ -336,7 +336,10 @@ filterwarnings = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
[tool.coverage.run]
|
[tool.coverage.run]
|
||||||
|
# https://coverage.readthedocs.io/en/latest/config.html#run
|
||||||
data_file = ".temp/coverage.sqlite"
|
data_file = ".temp/coverage.sqlite"
|
||||||
|
branch = true # track branch coverage
|
||||||
|
relative_files = true
|
||||||
|
|
||||||
|
|
||||||
#####################
|
#####################
|
||||||
|
|||||||
Reference in New Issue
Block a user