From a56fd4ac3602d2a822b7b8f1a4a5dcce4b933184 Mon Sep 17 00:00:00 2001 From: shralex Date: Wed, 24 Dec 2025 09:13:21 +0000 Subject: [PATCH] Fix Codecov setup Minor fixes in an attempt to make code coverage work. --- .github/workflows/run_tests_against_package.yml | 2 +- codecov.yml | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/run_tests_against_package.yml b/.github/workflows/run_tests_against_package.yml index 8ac8da6a5..3684de14c 100644 --- a/.github/workflows/run_tests_against_package.yml +++ b/.github/workflows/run_tests_against_package.yml @@ -130,4 +130,4 @@ jobs: with: token: ${{ secrets.CODECOV_TOKEN }} # If scheduled, upload to BOTH flags. If PR, upload ONLY to regular. - flags: ${{ inputs.is_scheduled_run == 'true' && 'regular,scheduled' || 'regular' }} + flags: ${{ inputs.is_scheduled_run == 'true' && 'scheduled' || 'regular' }} diff --git a/codecov.yml b/codecov.yml index 746016e31..70144a392 100644 --- a/codecov.yml +++ b/codecov.yml @@ -19,13 +19,17 @@ # Without it, PRs would show a significant coverage drop as they would 'overwrite' the full-suite results. # # Scheme: -# - 'regular': Updated by every PR/Schedule. Used to evaluate 'patch' (new code) coverage. -# - 'scheduled': Updated ONLY by scheduled full runs. Used to anchor 'project' (total health) coverage. +# - 'regular': Updated by every PR. Used to evaluate 'patch' (new code) coverage. +# - 'scheduled': Updated by scheduled full runs. Used to anchor 'project' (total health) coverage. # During PRs, the 'scheduled' flag is carried forward from the last full run on 'main' to keep the score stable. # Exclude non-source code, deprecated and experimental folders from coverage tracking codecov: token: 35742a22-fb1f-4839-97ff-b54da5588689 +# By default file names in the coverage report will have their path in the file system, which in our +# runners would be /__w/maxtext/maxtext/src/MaxText/* but Codecov expects src/MaxText/* so we need to fix the path +fixes: + - ".*/maxtext/src/::src/" ignore: - "src/MaxText/assets" - "src/MaxText/configs"