Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 29 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,12 @@ concurrency:

env:
DEFAULT_PYTHON: '3.13'
MIN_COVERAGE: 100

permissions:
contents: read
contents: write
checks: write
pull-requests: write

jobs:
tests:
Expand Down Expand Up @@ -119,13 +122,32 @@ jobs:
- name: Generate coverate reports
run: ./combine_coverage.sh

- name: Check coverage
uses: codecov/codecov-action@v5
- name: Coverage comment
id: coverage
uses: MishaKav/pytest-coverage-comment@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./reports/coverage.xml
fail_ci_if_error: true
plugin: noop
pytest-xml-coverage-path: ./reports/coverage.xml
default-branch: develop
xml-skip-covered: true
report-only-changed-files: true
hide-comment: ${{ github.event_name != 'pull_request' }}

- name: Dynamic Badges
uses: schneegans/[email protected]
if: github.repository == 'MobileTeleSystems/evacuator' && github.event_name == 'push'
with:
auth: ${{ secrets.AUTOMERGE_TOKEN }}
gistID: 03e73a82ecc4709934540ce8201cc3b4
filename: evacuator_badge.json
label: Coverage
message: ${{ steps.coverage.outputs.coverage }}
color: ${{ steps.coverage.outputs.color }}

- name: Fail if coverage too low
if: ${{ steps.coverage.outputs.coverage < env.MIN_COVERAGE }}
run: |
echo "Coverage is below ${{ env.MIN_COVERAGE }}%!"
exit 1

- name: All done
run: echo 1
6 changes: 3 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ Evacuator
.. |CI Status| image:: https://github.com/MobileTeleSystems/evacuator/workflows/Tests/badge.svg
:alt: Github Actions - latest CI build status
:target: https://github.com/MobileTeleSystems/evacuator/actions
.. |Test Coverage| image:: https://codecov.io/gh/MobileTeleSystems/evacuator/branch/develop/graph/badge.svg?token=CM6AQWY65P
:alt: Test coverage - percent
:target: https://codecov.io/gh/MobileTeleSystems/evacuator
.. |Test Coverage| image:: https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/
MTSOnGithub/03e73a82ecc4709934540ce8201cc3b4/raw/evacuator_badge.json
:target: https://github.com/MobileTeleSystems/evacuator/actions
.. |pre-commit.ci Status| image:: https://results.pre-commit.ci/badge/github/MobileTeleSystems/evacuator/develop.svg
:alt: pre-commit.ci - status
:target: https://results.pre-commit.ci/latest/github/MobileTeleSystems/evacuator/develop
Expand Down
6 changes: 0 additions & 6 deletions codecov.yml

This file was deleted.

Loading