|
1 | 1 | codecov: |
| 2 | + # Global Codecov settings |
| 3 | + branch: master # set default branch (overrides Git default) |
| 4 | + max_report_age: off # Turn off max report age |
| 5 | + strict_yaml_branch: master # always use YAML from master branch |
| 6 | + |
| 7 | + # Bot configuration for GitHub operations |
| 8 | + bot: "codecov[bot]" # GitHub App bot username |
| 9 | + |
| 10 | + # Notification settings |
2 | 11 | notify: |
3 | | - require_ci_to_pass: yes |
| 12 | + require_ci_to_pass: yes # require CI to pass before processing coverage |
| 13 | + after_n_builds: 2 # wait for both backend and frontend uploads |
| 14 | + wait_for_ci: yes # wait for CI completion |
4 | 15 |
|
5 | 16 | coverage: |
6 | | - precision: 2 |
7 | | - round: down |
8 | | - range: "70...100" |
| 17 | + precision: 2 # decimal places in coverage percentage |
| 18 | + round: down # round coverage down |
| 19 | + range: "70...100" # acceptable coverage range |
| 20 | + |
| 21 | + # Comprehensive ignore paths for coverage calculation |
| 22 | + ignore: |
| 23 | + # Python environment and system files |
| 24 | + - "*/python?.?/*" # Python installations |
| 25 | + - "*/site-packages/*" # Python packages |
| 26 | + - "*/venv/*" # virtual environments |
| 27 | + - "*/env/*" # virtual environments |
| 28 | + - "*/.venv/*" # virtual environments |
| 29 | + |
| 30 | + # Django generated/boilerplate files |
| 31 | + - "*/migrations/*" # Django migrations |
| 32 | + - "*/templates/*" # Django templates |
| 33 | + - "*/static/*" # static files |
| 34 | + - "*/media/*" # media files |
| 35 | + - "manage.py" # Django management script |
| 36 | + - "evalai/wsgi.py" # WSGI configuration |
| 37 | + - "evalai/asgi.py" # ASGI configuration |
| 38 | + |
| 39 | + # Test files |
| 40 | + - "*/tests/*" # test directories |
| 41 | + - "*/test_*.py" # test files |
| 42 | + - "*_test.py" # test files |
| 43 | + - "test_*.py" # test files |
| 44 | + - "conftest.py" # pytest configuration |
| 45 | + |
| 46 | + # Django settings (environment-specific) |
| 47 | + - "settings/custom_storages.py" # storage settings |
| 48 | + - "settings/staging.py" # staging settings |
| 49 | + - "settings/dev.py" # development settings |
| 50 | + - "settings/prod.py" # production settings |
| 51 | + - "settings/test.py" # test settings |
| 52 | + |
| 53 | + # Scripts and utilities |
| 54 | + - "scripts/seed.py" # seed script |
| 55 | + - "scripts/migration/*" # migration scripts |
| 56 | + - "scripts/deployment/*" # deployment scripts |
| 57 | + |
| 58 | + # Third-party dependencies |
| 59 | + - "*/node_modules/*" # Node.js dependencies |
| 60 | + - "*/bower_components/*" # Bower dependencies |
| 61 | + |
| 62 | + # Frontend (not Python) |
| 63 | + - "frontend_v2/" # frontend v2 directory |
| 64 | + |
| 65 | + # Other non-essential files |
| 66 | + - "*/middleware/*" # middleware files |
| 67 | + - "*/admin.py" # Django admin |
| 68 | + - "*/apps.py" # Django app configuration |
| 69 | + - "*.min.js" # minified JavaScript |
| 70 | + - "*.min.css" # minified CSS |
9 | 71 |
|
10 | 72 | status: |
11 | | - project: yes |
12 | | - patch: yes |
13 | | - changes: no |
| 73 | + # Default rules applied to all status checks |
| 74 | + default_rules: |
| 75 | + flag_coverage_not_uploaded_behavior: exclude |
| 76 | + |
| 77 | + # Project status checks |
| 78 | + project: |
| 79 | + default: false # disable default project status |
| 80 | + |
| 81 | + backend: |
| 82 | + target: 70% # minimum coverage required |
| 83 | + threshold: 1% # allow coverage to drop by 1% |
| 84 | + flags: |
| 85 | + - backend |
| 86 | + paths: |
| 87 | + - evalai/ |
| 88 | + - apps/ |
| 89 | + if_ci_failed: error # fail status if CI fails |
| 90 | + informational: false |
| 91 | + only_pulls: false |
| 92 | + |
| 93 | + frontend: |
| 94 | + target: 70% |
| 95 | + threshold: 1% |
| 96 | + flags: |
| 97 | + - frontend |
| 98 | + paths: |
| 99 | + - frontend/ |
| 100 | + if_ci_failed: error |
| 101 | + informational: false |
| 102 | + only_pulls: false |
| 103 | + |
| 104 | + # Combined overall project status |
| 105 | + overall: |
| 106 | + target: 70% |
| 107 | + threshold: 2% |
| 108 | + patch: |
| 109 | + default: |
| 110 | + target: 80% # require 80% coverage on new/changed lines |
| 111 | + threshold: 0% # no threshold for patch coverage |
| 112 | + if_ci_failed: error |
| 113 | + only_pulls: true # only apply to pull requests |
| 114 | + |
| 115 | + backend_patch: |
| 116 | + target: 80% |
| 117 | + flags: |
| 118 | + - backend |
| 119 | + paths: |
| 120 | + - evalai/ |
| 121 | + - apps/ |
| 122 | + only_pulls: true |
| 123 | + |
| 124 | + frontend_patch: |
| 125 | + target: 70% # slightly lower for frontend |
| 126 | + flags: |
| 127 | + - frontend |
| 128 | + paths: |
| 129 | + - frontend/ |
| 130 | + only_pulls: true |
14 | 131 |
|
| 132 | +flags: |
| 133 | + backend: |
| 134 | + paths: |
| 135 | + - evalai/ |
| 136 | + - apps/ |
| 137 | + frontend: |
| 138 | + paths: |
| 139 | + - frontend/ |
| 140 | + |
| 141 | +# Components configuration - isolate and categorize coverage data |
| 142 | +component_management: |
| 143 | + default_rules: # default rules inherited by all components |
| 144 | + statuses: |
| 145 | + - type: project |
| 146 | + target: 70% |
| 147 | + threshold: 1% |
| 148 | + |
| 149 | + individual_components: |
| 150 | + # Backend Core Components |
| 151 | + - component_id: accounts_module |
| 152 | + name: "Accounts & Authentication" |
| 153 | + paths: |
| 154 | + - apps/accounts/** |
| 155 | + statuses: |
| 156 | + - type: project |
| 157 | + target: 75% # higher target for authentication |
| 158 | + - type: patch |
| 159 | + target: 85% |
| 160 | + |
| 161 | + - component_id: challenges_module |
| 162 | + name: "Challenges Management" |
| 163 | + paths: |
| 164 | + - apps/challenges/** |
| 165 | + statuses: |
| 166 | + - type: project |
| 167 | + target: 80% # core functionality needs high coverage |
| 168 | + - type: patch |
| 169 | + target: 85% |
| 170 | + |
| 171 | + - component_id: jobs_module |
| 172 | + name: "Job Processing" |
| 173 | + paths: |
| 174 | + - apps/jobs/** |
| 175 | + statuses: |
| 176 | + - type: project |
| 177 | + target: 75% |
| 178 | + - type: patch |
| 179 | + target: 80% |
| 180 | + |
| 181 | + - component_id: participants_module |
| 182 | + name: "Participants & Teams" |
| 183 | + paths: |
| 184 | + - apps/participants/** |
| 185 | + statuses: |
| 186 | + - type: project |
| 187 | + target: 70% |
| 188 | + - type: patch |
| 189 | + target: 75% |
| 190 | + |
| 191 | + - component_id: hosts_module |
| 192 | + name: "Challenge Hosts" |
| 193 | + paths: |
| 194 | + - apps/hosts/** |
| 195 | + |
| 196 | + - component_id: analytics_module |
| 197 | + name: "Analytics" |
| 198 | + paths: |
| 199 | + - apps/analytics/** |
| 200 | + |
| 201 | + - component_id: web_module |
| 202 | + name: "Web Interface" |
| 203 | + paths: |
| 204 | + - apps/web/** |
| 205 | + |
| 206 | + # Frontend Components |
| 207 | + - component_id: frontend |
| 208 | + name: "Frontend (Gulp)" |
| 209 | + paths: |
| 210 | + - frontend/** |
| 211 | + flag_regexes: |
| 212 | + - "frontend" |
| 213 | + statuses: |
| 214 | + - type: project |
| 215 | + target: 65% # frontend might have lower coverage |
| 216 | + |
| 217 | + # Cross-cutting Components |
| 218 | + - component_id: models_all |
| 219 | + name: "All Models" |
| 220 | + paths: |
| 221 | + - "**/models.py" |
| 222 | + statuses: |
| 223 | + - type: project |
| 224 | + target: 85% # models should be well tested |
| 225 | + |
| 226 | + - component_id: views_all |
| 227 | + name: "All Views" |
| 228 | + paths: |
| 229 | + - "**/views.py" |
| 230 | + statuses: |
| 231 | + - type: project |
| 232 | + target: 75% |
| 233 | + |
| 234 | + - component_id: serializers_all |
| 235 | + name: "All Serializers" |
| 236 | + paths: |
| 237 | + - "**/serializers.py" |
| 238 | + statuses: |
| 239 | + - type: project |
| 240 | + target: 80% |
| 241 | + |
| 242 | + - component_id: utils_all |
| 243 | + name: "Utility Functions" |
| 244 | + paths: |
| 245 | + - "**/utils.py" |
| 246 | + - "**/aws_utils.py" |
| 247 | + - "apps/base/**" |
| 248 | + statuses: |
| 249 | + - type: project |
| 250 | + target: 70% |
| 251 | + |
| 252 | + # Configuration & Scripts |
| 253 | + - component_id: core_config |
| 254 | + name: "Core Configuration" |
| 255 | + paths: |
| 256 | + - evalai/** |
| 257 | + - settings/** |
| 258 | + - "*.py" # root level Python files |
| 259 | + statuses: |
| 260 | + - type: project |
| 261 | + target: 60% # config files might have lower coverage |
| 262 | + |
| 263 | +# Parsers configuration for different coverage formats |
| 264 | +parsers: |
| 265 | + gcov: |
| 266 | + branch_detection: |
| 267 | + conditional: yes |
| 268 | + loop: yes |
| 269 | + method: no |
| 270 | + macro: no |
| 271 | + javascript: |
| 272 | + enable_partials: no |
| 273 | + |
| 274 | +# Pull request comment configuration |
15 | 275 | comment: |
16 | | - layout: "header, diff, flags, files, changes, sunburst, uncovered, tree, footer" |
17 | | - behavior: default |
18 | | - require_changes: no |
| 276 | + layout: "header, diff, flags, components, files, changes, sunburst, uncovered, tree, footer" |
| 277 | + behavior: default # default, once, new, spammy |
| 278 | + require_changes: no # post comment even if no coverage changes |
| 279 | + require_base: no # post comment even if no base coverage |
| 280 | + require_head: yes # only post if head coverage exists |
| 281 | + hide_project_coverage: no # show project coverage in comment |
| 282 | + |
| 283 | +# GitHub Checks integration |
| 284 | +github_checks: |
| 285 | + annotations: true # show coverage annotations on GitHub |
| 286 | + |
| 287 | +# Profiling configuration |
| 288 | +profiling: |
| 289 | + critical_files_paths: # files that are critical for the project |
| 290 | + - "apps/accounts/**" # authentication |
| 291 | + - "apps/challenges/**" # core functionality |
| 292 | + - "apps/jobs/**" # job processing |
| 293 | + |
| 294 | +# Slack notifications (optional - requires setup) |
| 295 | +# slack: |
| 296 | +# url: "your-slack-webhook-url" |
| 297 | +# threshold: 1% |
| 298 | +# message: "Coverage changed by {{ range diff }}% in {{ owner }}/{{ repo }}" |
0 commit comments