File tree Expand file tree Collapse file tree 4 files changed +43
-1
lines changed Expand file tree Collapse file tree 4 files changed +43
-1
lines changed Original file line number Diff line number Diff line change 1+ coverage :
2+ status :
3+ project :
4+ default :
5+ target : 50%
6+ threshold : 0
7+ informational : true
8+ patch :
9+ default :
10+ target : 50%
11+ threshold : 0
12+ informational : true
Original file line number Diff line number Diff line change 2121 - mvn clean install -q -DskipTests
2222 - cd openaev-api
2323 - mvn test
24+ - echo "Running coverage validation..."
25+ - mvn jacoco:check || echo "⚠️ Coverage threshold check ⚠️"
2426 - cd ../openaev-framework
2527 - mvn test
2628
Original file line number Diff line number Diff line change 2020
2121 # Regex for:
2222 # [category/subcategory] type(scope?): description (#123?)
23- PATTERN='^\[([a-z]+(/[a-z]+)*)\] (feat|fix|chore|docs|style|refactor|perf|test|build|ci|revert)(\([a-z]+\))?: [a-z].*( \(#[0-9]+\))$'
23+ PATTERN='^\[([a-z]+(/[a-z]+)*)\] (feat|fix|chore|docs|style|refactor|perf|test|build|ci|revert)(\([a-z- ]+\))?: [a-z].*( \(#[0-9]+\))$'
2424
2525 if [[ ! "$TITLE" =~ $PATTERN ]]; then
2626 echo "❌ Invalid PR title."
Original file line number Diff line number Diff line change 326326 <groupId >org.jacoco</groupId >
327327 <artifactId >jacoco-maven-plugin</artifactId >
328328 <version >${jacoco-plugin.version} </version >
329+ <configuration >
330+ <haltOnFailure >false</haltOnFailure >
331+ <rules >
332+ <rule >
333+ <element >BUNDLE</element >
334+ <limits >
335+ <limit >
336+ <counter >LINE</counter >
337+ <value >COVEREDRATIO</value >
338+ <minimum >0.50</minimum > <!-- 50% minimum coverage -->
339+ </limit >
340+ <limit >
341+ <counter >BRANCH</counter >
342+ <value >COVEREDRATIO</value >
343+ <minimum >0.30</minimum >
344+ </limit >
345+ </limits >
346+ </rule >
347+ </rules >
348+ </configuration >
329349 <executions >
330350 <execution >
331351 <goals >
339359 <goal >report</goal >
340360 </goals >
341361 </execution >
362+ <!-- Enforce coverage threshold -->
363+ <execution >
364+ <id >check</id >
365+ <phase >verify</phase >
366+ <goals >
367+ <goal >check</goal >
368+ </goals >
369+ </execution >
342370 </executions >
343371 </plugin >
344372 <plugin >
You can’t perform that action at this time.
0 commit comments