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/tests.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: 92

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

jobs:
oracle_tests:
Expand Down Expand Up @@ -128,13 +131,32 @@ jobs:
coverage combine
coverage xml -o reports/coverage.xml -i

- name: Check coverage
uses: codecov/codecov-action@v5
- name: Coverage comment
id: coverage
uses: MishaKav/pytest-coverage-comment@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./reports/coverage.xml
fail_ci_if_error: true
plugins: noop
pytest-xml-coverage-path: ./reports/coverage.xml
default-branch: develop
xml-skip-covered: true
Comment thread
dolfinus marked this conversation as resolved.
report-only-changed-files: true


- name: Dynamic Badges
uses: schneegans/dynamic-badges-action@v1.7.0
if: github.repository == 'MobileTeleSystems/syncmaster' && github.event_name == 'push'
with:
Comment thread
dolfinus marked this conversation as resolved.
auth: ${{ secrets.AUTOMERGE_TOKEN }}
gistID: 03e73a82ecc4709934540ce8201cc3b4
filename: syncmaster_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
5 changes: 3 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@ Data.SyncMaster
:target: https://syncmaster.readthedocs.io
.. |Build Status| image:: https://github.com/MobileTeleSystems/syncmaster/workflows/Run%20All%20Tests/badge.svg
:target: https://github.com/MobileTeleSystems/syncmaster/actions
.. |Coverage| image:: https://codecov.io/gh/MobileTeleSystems/syncmaster/graph/badge.svg?token=ky7UyUxolB
:target: https://codecov.io/gh/MobileTeleSystems/syncmaster
.. |Coverage| image:: https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/
Comment thread
dolfinus marked this conversation as resolved.
MTSOnGithub/03e73a82ecc4709934540ce8201cc3b4/raw/syncmaster_badge.json
:target: https://github.com/MobileTeleSystems/syncmaster/actions
.. |pre-commit.ci| image:: https://results.pre-commit.ci/badge/github/MobileTeleSystems/syncmaster/develop.svg
:target: https://results.pre-commit.ci/latest/github/MobileTeleSystems/syncmaster/develop

Expand Down
6 changes: 0 additions & 6 deletions codecov.yml

This file was deleted.

Loading