|
| 1 | +# Copyright 2023–2025 Google LLC |
| 2 | +# |
| 3 | +# Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | +# you may not use this file except in compliance with the License. |
| 5 | +# You may obtain a copy of the License at |
| 6 | +# |
| 7 | +# https://www.apache.org/licenses/LICENSE-2.0 |
| 8 | +# |
| 9 | +# Unless required by applicable law or agreed to in writing, software |
| 10 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | +# See the License for the specific language governing permissions and |
| 13 | +# limitations under the License. |
| 14 | + |
| 15 | +# MaxText Codecov Configuration |
| 16 | +# |
| 17 | +# We use a two-flag scheme ('regular' and 'scheduled') to handle our tiered test suite. |
| 18 | +# 'carryforward' is enabled because Pull Requests only run a subset of tests (excluding 'scheduled_only'). |
| 19 | +# Without it, PRs would show a significant coverage drop as they would 'overwrite' the full-suite results. |
| 20 | +# |
| 21 | +# Scheme: |
| 22 | +# - 'regular': Updated by every PR/Schedule. Used to evaluate 'patch' (new code) coverage. |
| 23 | +# - 'scheduled': Updated ONLY by scheduled full runs. Used to anchor 'project' (total health) coverage. |
| 24 | +# During PRs, the 'scheduled' flag is carried forward from the last full run on 'main' to keep the score stable. |
| 25 | + |
| 26 | +# Exclude non-source code, deprecated and experimental folders from coverage tracking |
| 27 | +ignore: |
| 28 | + - "src/MaxText/assets" |
| 29 | + - "src/MaxText/configs" |
| 30 | + - "src/MaxText/examples" |
| 31 | + - "src/MaxText/experimental" |
| 32 | + - "src/MaxText/inference" |
| 33 | + - "src/MaxText/inference_mlperf" |
| 34 | + - "src/MaxText/scratch_code" |
| 35 | + - "src/MaxText/test_assets" |
| 36 | + |
| 37 | + |
| 38 | +flags: |
| 39 | + # Updated on every PR and during every scheduled run (contains a subset of tests). |
| 40 | + regular: |
| 41 | + carryforward: true |
| 42 | + # Updated ONLY during scheduled runs (contains all tests). |
| 43 | + scheduled: |
| 44 | + carryforward: true |
| 45 | + |
| 46 | +coverage: |
| 47 | + status: |
| 48 | + # Project score remains stable at the 'Full Suite' level. |
| 49 | + # It carries forward the last 'scheduled' results during PRs. |
| 50 | + project: |
| 51 | + default: |
| 52 | + target: auto |
| 53 | + threshold: 5% # fail on 5+ percent degradation |
| 54 | + flags: |
| 55 | + - scheduled |
| 56 | + |
| 57 | + # Patch score provides feedback on the code changed in a PR. |
| 58 | + patch: |
| 59 | + default: |
| 60 | + target: auto |
| 61 | + threshold: 5% # fail on 5+ percent degradation |
| 62 | + flags: |
| 63 | + - regular |
| 64 | + |
0 commit comments