Skip to content

Commit

Permalink
Upload test and code coverage reports to GitHub
Browse files Browse the repository at this point in the history
  • Loading branch information
jjohannes committed Jun 22, 2024
1 parent dd8c4ae commit 12ee479
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 9 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,14 @@ jobs:
- run: "./gradlew test"
- run: "./gradlew testEndToEnd"
- run: "./gradlew testEndToEndSlow"
- run: "./gradlew build"
- run: "./gradlew cyclonedxBom --no-configuration-cache"
- run: "./gradlew publish"
if: ${{ !contains(github.ref, 'dependabot') }}
- uses: actions/upload-artifact@v4
if: always()
with:
path: gradle/aggregation/build/reports
- uses: DependencyTrack/gh-upload-sbom@v3
if: ${{ !contains(github.ref, 'dependabot') }}
with:
Expand Down
1 change: 1 addition & 0 deletions gradle/aggregation/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ plugins {
id("org.example.gradle.report.code-coverage")
id("org.example.gradle.report.plugin-analysis")
id("org.example.gradle.report.sbom")
id("org.example.gradle.report.test")
}

dependencies {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,3 @@ tasks.check {
// Generate report when running 'check'
dependsOn(tasks.testCodeCoverageReport)
}

// Clear tasks group 'build' from clutter for a clean set of tasks to be used in daily work
tasks.buildDependents { setGroup(null) }

tasks.buildNeeded { setGroup(null) }

tasks.jar { setGroup(null) }

sourceSets.all { tasks.named(classesTaskName) { group = null } }
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
plugins {
id("org.gradle.java")
id("org.gradle.test-report-aggregation")
id("org.example.gradle.base.dependency-rules")
id("org.example.gradle.base.lifecycle")
}

tasks.check {
// Generate report when running 'check'
dependsOn(tasks.testAggregateTestReport)
}

// Clear tasks group 'build' from clutter for a clean set of tasks to be used in daily work
tasks.buildDependents { setGroup(null) }

tasks.buildNeeded { setGroup(null) }

tasks.jar { setGroup(null) }

sourceSets.all { tasks.named(classesTaskName) { group = null } }

0 comments on commit 12ee479

Please sign in to comment.