Skip to content

Commit 111cb6b

Browse files
Merge pull request #2934 from Shuang-cnt:codecov_dummy
PiperOrigin-RevId: 856329055
2 parents 91363de + f4eb275 commit 111cb6b

3 files changed

Lines changed: 25 additions & 3 deletions

File tree

.coveragerc

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# .coveragerc
2+
3+
[run]
4+
source = MaxText
5+
branch = True
6+
omit =
7+
tests/*
8+
.venv/*
9+
10+
[paths]
11+
source =
12+
src/MaxText
13+
*/site-packages/MaxText
14+
15+
[report]
16+
show_missing = True

.github/workflows/run_tests_against_package.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,13 +121,18 @@ jobs:
121121
-m "${FINAL_PYTEST_MARKER}" \
122122
--durations=0 \
123123
--deselect "tests/tokenizer_test.py::TokenizerTest::test_detokenize" \
124-
--cov=src/MaxText \
124+
--cov=MaxText \
125125
--cov-report=xml \
126+
--cov-report=term \
126127
$SPLIT_ARGS
128+
env:
129+
PYTHONPATH: "${{ github.workspace }}/src"
127130
- name: Upload results to Codecov
128131
uses: codecov/codecov-action@v5
129132
continue-on-error: true
130133
with:
131134
token: ${{ secrets.CODECOV_TOKEN }}
135+
file: ./coverage.xml
132136
# If scheduled, upload to BOTH flags. If PR, upload ONLY to regular.
133-
flags: ${{ inputs.is_scheduled_run == 'true' && 'scheduled' || 'regular' }}
137+
flags: ${{ inputs.is_scheduled_run == 'true' && 'regular,scheduled' || 'regular' }}
138+
verbose: true

codecov.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ codecov:
2929
# By default file names in the coverage report will have their path in the file system, which in our
3030
# runners would be /__w/maxtext/maxtext/src/MaxText/* but Codecov expects src/MaxText/* so we need to fix the path
3131
fixes:
32-
- ".*/maxtext/src/::src/"
32+
# - ".*/maxtext/src/::src/"
33+
- "/github/workspace/::"
3334
ignore:
3435
- "src/MaxText/assets"
3536
- "src/MaxText/configs"

0 commit comments

Comments
 (0)