Skip to content

Fix coverage

Fix coverage #1727

Workflow file for this run

name: Run All Tests
on:
push:
branches:
- develop
pull_request:
branches-ignore:
- master
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true
env:
DEFAULT_PYTHON: '3.13'
MIN_COVERAGE: 88
permissions:
contents: write
checks: write
pull-requests: write
jobs:
oracle_tests:
name: Oracle tests
uses: ./.github/workflows/oracle-tests.yml
clickhouse_tests:
name: Clickhouse tests
uses: ./.github/workflows/clickhouse-tests.yml
mysql_tests:
name: MySQL tests
uses: ./.github/workflows/mysql-tests.yml
mssql_tests:
name: MSSQL tests
uses: ./.github/workflows/mssql-tests.yml
hdfs_tests:
name: HDFS tests
uses: ./.github/workflows/hdfs-tests.yml
hive_tests:
name: Hive tests
uses: ./.github/workflows/hive-tests.yml
iceberg_tests:
name: Iceberg tests
uses: ./.github/workflows/iceberg-tests.yml
s3_tests:
name: S3 tests
uses: ./.github/workflows/s3-tests.yml
sftp_tests:
name: SFTP tests
uses: ./.github/workflows/sftp-tests.yml
ftp_tests:
name: FTP tests
uses: ./.github/workflows/ftp-tests.yml
ftps_tests:
name: FTPS tests
uses: ./.github/workflows/ftps-tests.yml
samba_tests:
name: Samba tests
uses: ./.github/workflows/samba-tests.yml
webdav_tests:
name: WebDAV tests
uses: ./.github/workflows/webdav-tests.yml
scheduler_tests:
name: Scheduler tests
uses: ./.github/workflows/scheduler-tests.yml
unit_tests:
name: Unit tests
uses: ./.github/workflows/unit-test.yml
all_done:
name: Tests done
runs-on: ubuntu-latest
if: always()
needs:
- unit_tests
- scheduler_tests
- clickhouse_tests
- ftp_tests
- ftps_tests
- hdfs_tests
- hive_tests
- iceberg_tests
- mssql_tests
- mysql_tests
- oracle_tests
- s3_tests
- samba_tests
- sftp_tests
- webdav_tests
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Download all coverage reports
uses: actions/download-artifact@v7
with:
path: reports/
pattern: coverage-*
merge-multiple: true
- name: Show test results
uses: mikepenz/action-junit-report@v5
if: success() || failure() # always run even if the previous step fails
with:
report_paths: reports/junit/*.xml
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
uses: actions/setup-python@v6
with:
python-version: ${{ env.DEFAULT_PYTHON }}
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: 'false'
- name: Install dependencies
run: |
uv sync --frozen --group test
- name: Generate coverage reports
run: |
uv run coverage combine
uv run coverage xml -o reports/coverage.xml -i
- name: Coverage comment
id: coverage
uses: MishaKav/pytest-coverage-comment@v1
with:
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/syncmaster' && github.event_name == 'push'
with:
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