Skip to content

Commit

Permalink
Merge pull request #27 from uhafner/sub-score-logger
Browse files Browse the repository at this point in the history
Support logging of sub scores
  • Loading branch information
uhafner authored Apr 12, 2024
2 parents ae600a1 + ad76fd8 commit 823c682
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 19 deletions.
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ inputs:
required: false
runs:
using: 'docker'
image: 'docker://uhafner/quality-monitor:1.7.0-SNAPSHOT'
image: 'docker://uhafner/quality-monitor:1.7.0'
env:
CONFIG: ${{ inputs.config }}
CHECKS_NAME: ${{ inputs.checks-name }}
Expand Down
4 changes: 2 additions & 2 deletions doc/dependency-graph.puml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ rectangle "jackson-databind\n\n2.17.0" as com_fasterxml_jackson_core_jackson_dat
rectangle "jackson-annotations\n\n2.17.0" as com_fasterxml_jackson_core_jackson_annotations_jar
rectangle "jackson-core\n\n2.17.0" as com_fasterxml_jackson_core_jackson_core_jar
rectangle "byte-buddy\n\n1.14.13" as net_bytebuddy_byte_buddy_jar
rectangle "quality-monitor\n\n1.7.0-SNAPSHOT" as edu_hm_hafner_quality_monitor_jar
rectangle "quality-monitor\n\n1.7.0" as edu_hm_hafner_quality_monitor_jar
rectangle "github-api\n\n1.321" as org_kohsuke_github_api_jar
rectangle "spotbugs-annotations\n\n4.8.3" as com_github_spotbugs_spotbugs_annotations_jar
rectangle "error_prone_annotations\n\n2.26.1" as com_google_errorprone_error_prone_annotations_jar
Expand Down Expand Up @@ -101,4 +101,4 @@ edu_hm_hafner_quality_monitor_jar -[#000000]-> edu_hm_hafner_codingstyle_jar
edu_hm_hafner_quality_monitor_jar -[#000000]-> org_apache_commons_commons_lang3_jar
edu_hm_hafner_quality_monitor_jar -[#000000]-> commons_io_commons_io_jar
edu_hm_hafner_quality_monitor_jar -[#000000]-> net_bytebuddy_byte_buddy_jar
@enduml
@enduml
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

<groupId>edu.hm.hafner</groupId>
<artifactId>quality-monitor</artifactId>
<version>1.7.0-SNAPSHOT</version>
<version>1.7.0</version>
<packaging>jar</packaging>

<scm>
Expand All @@ -29,7 +29,7 @@

<java.version>17</java.version>

<autograding-model.version>3.29.0</autograding-model.version>
<autograding-model.version>3.30.0</autograding-model.version>
<github-api.version>1.321</github-api.version>
<testcontainers.version>1.19.7</testcontainers.version>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
import static org.assertj.core.api.Assertions.*;

/**
* Integration test for the grading action. Starts the container and checks if the grading runs as expected.
* Integration test for the quality monitor action.
* Starts the container and checks if the action runs as expected.
*
* @author Ullrich Hafner
*/
Expand Down Expand Up @@ -120,13 +121,16 @@ void shouldGradeInDockerContainer() throws TimeoutException, IOException {
.contains(new String[] {
"Processing 1 test configuration(s)",
"-> Unittests Total: TESTS: 1 tests",
"=> Unittests: 1 tests passed",
"=> JUnit: 1 tests passed",
"Processing 2 coverage configuration(s)",
"-> Line Coverage Total: LINE: 10.93% (33/302)",
"=> Line Coverage: 11% (269 missed lines)",
"-> Branch Coverage Total: BRANCH: 9.52% (4/42)",
"> JaCoCo: 10% coverage achieved",
"=> Branch Coverage: 10% (38 missed branches)",
"=> JaCoCo: 10% (307 missed items)",
"-> Mutation Coverage Total: MUTATION: 7.86% (11/140)",
"=> PIT: 8% mutations killed",
"=> PIT: 8% (129 survived mutations)",
"Processing 2 static analysis configuration(s)",
"-> CheckStyle Total: 1 warnings",
"-> PMD Total: 1 warnings",
Expand Down Expand Up @@ -154,9 +158,9 @@ void shouldUseDefaultConfiguration() throws TimeoutException {
"Processing 2 coverage configuration(s)",
"-> Line Coverage Total: LINE: 10.93% (33/302)",
"-> Branch Coverage Total: BRANCH: 9.52% (4/42)",
"=> Code Coverage: 10% coverage achieved",
"=> Code Coverage: 10%",
"-> Mutation Coverage Total: MUTATION: 7.86% (11/140)",
"=> Mutation Coverage: 8% mutations killed",
"=> Mutation Coverage: 8% ",
"Processing 2 static analysis configuration(s)",
"-> CheckStyle Total: 1 warnings",
"-> PMD Total: 1 warnings",
Expand All @@ -177,10 +181,10 @@ void shouldShowErrors() throws TimeoutException {
"Configuration error for 'Tests'?",
"=> Tests: 0 tests passed",
"Processing 2 coverage configuration(s)",
"=> Code Coverage: 0% coverage achieved",
"=> Code Coverage: 0%",
"Configuration error for 'Line Coverage'?",
"Configuration error for 'Branch Coverage'?",
"=> Mutation Coverage: 0% mutations killed",
"=> Mutation Coverage: 0%",
"Configuration error for 'Mutation Coverage'?",
"Processing 2 static analysis configuration(s)",
"Configuration error for 'CheckStyle'?",
Expand All @@ -195,7 +199,7 @@ void shouldShowErrors() throws TimeoutException {
}

private GenericContainer<?> createContainer() {
return new GenericContainer<>(DockerImageName.parse("uhafner/quality-monitor:1.7.0-SNAPSHOT"));
return new GenericContainer<>(DockerImageName.parse("uhafner/quality-monitor:1.7.0"));
}

private String readStandardOut(final GenericContainer<? extends GenericContainer<?>> container) throws TimeoutException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,10 @@ void shouldMonitorQualityWithDefaultConfiguration() {
"Processing 2 coverage configuration(s)",
"\"coveredPercentageImpact\" : 0,",
"\"missedPercentageImpact\" : 0,",
"=> Code Coverage: 0% coverage achieved",
"=> Mutation Coverage: 0% mutations killed",
"=> Line Coverage: 0% (0 missed lines)",
"=> Branch Coverage: 0% (0 missed branches)",
"=> Code Coverage: 0% (0 missed items)",
"=> Mutation Coverage: 0% (0 survived mutations)",
"Processing 2 static analysis configuration(s)",
"\"errorImpact\" : 0,",
"\"highImpact\" : 0,",
Expand All @@ -127,15 +129,16 @@ void shouldGradeWithConfigurationFromEnvironment() {
"Processing 2 coverage configuration(s)",
"-> Line Coverage Total: LINE: 10.93% (33/302)",
"-> Branch Coverage Total: BRANCH: 9.52% (4/42)",
"=> JaCoCo: 10% coverage achieved",
"=> JaCoCo: 10%",
"-> Mutation Coverage Total: MUTATION: 7.86% (11/140)",
"=> PIT: 8% mutations killed",
"=> PIT: 8%",
"Processing 2 static analysis configuration(s)",
"-> CheckStyle Total: 19 warnings",
"=> CheckStyle: 19 warnings found (0 error, 0 high, 19 normal, 0 low)",
"-> PMD Total: 41 warnings",
"=> Style: 60 warnings found (0 error, 0 high, 60 normal, 0 low)",
"=> PMD: 41 warnings found (0 error, 0 high, 41 normal, 0 low)",
"-> SpotBugs Total: 1 warnings",
"=> Bugs: 1 warning found (0 error, 0 high, 0 normal, 1 low)",
"=> SpotBugs: 1 warning found (0 error, 0 high, 0 normal, 1 low)",
"mutation=8",
"bugs=1",
"tests=37",
Expand Down

0 comments on commit 823c682

Please sign in to comment.