new codecov version and usage of token

Signed-off-by: Michele Dolfi <dol@zurich.ibm.com>
This commit is contained in:
Michele Dolfi 2025-04-14 13:31:19 +02:00
parent 5175048ab4
commit 6579c6f05f
2 changed files with 7 additions and 1 deletions

View File

@ -5,6 +5,9 @@ on:
type: boolean type: boolean
description: "If true, the coverage results are pushed to codecov.io." description: "If true, the coverage results are pushed to codecov.io."
default: true default: true
secrets:
CODECOV_TOKEN:
required: false
env: env:
HF_HUB_DOWNLOAD_TIMEOUT: "60" HF_HUB_DOWNLOAD_TIMEOUT: "60"
@ -40,8 +43,9 @@ jobs:
poetry run pytest -v --cov=docling --cov-report=xml tests poetry run pytest -v --cov=docling --cov-report=xml tests
- name: Upload coverage to Codecov - name: Upload coverage to Codecov
if: inputs.push_coverage if: inputs.push_coverage
uses: codecov/codecov-action@v2 uses: codecov/codecov-action@v5
with: with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.xml file: ./coverage.xml
- name: Run examples - name: Run examples
run: | run: |

View File

@ -17,3 +17,5 @@ jobs:
code-checks: code-checks:
if: ${{ github.event_name == 'push' || (github.event.pull_request.head.repo.full_name != 'docling-project/docling' && github.event.pull_request.head.repo.full_name != 'docling-project/docling') }} if: ${{ github.event_name == 'push' || (github.event.pull_request.head.repo.full_name != 'docling-project/docling' && github.event.pull_request.head.repo.full_name != 'docling-project/docling') }}
uses: ./.github/workflows/checks.yml uses: ./.github/workflows/checks.yml
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}