Skip to content

Commit

Permalink
Latest build conv (#462)
Browse files Browse the repository at this point in the history
  • Loading branch information
big-andy-coates authored Jun 27, 2024
1 parent 9c884a9 commit c27c428
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 8 deletions.
32 changes: 30 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
- uses: gradle/wrapper-validation-action@216d1ad2b3710bf005dc39237337b9673fd8fcd5 # v3.3.2
- uses: gradle/wrapper-validation-action@88425854a36845f9c881450d9660b5fd46bee142 # v3.4.2
- name: Fetch version history
# Do NOT want to fetch all tags if building a specific tag.
# Doing so could result in code published with wrong version, if newer tags have been pushed
Expand All @@ -46,6 +46,20 @@ jobs:
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
run: ./gradlew build coveralls
- name: Upload Reports
if: failure()
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
with:
name: reports-linux
path: '**/build/reports/**/*.xml'
retention-days: 5
- name: Upload Test Results
if: failure()
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
with:
name: test-results-linux
path: '**/build/test-results/**/*.xml'
retention-days: 5
- name: Publish
if: github.event_name == 'push' || github.event.inputs.publish_artifacts == 'true'
env:
Expand All @@ -72,7 +86,7 @@ jobs:
runs-on: windows-latest
steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
- uses: gradle/wrapper-validation-action@216d1ad2b3710bf005dc39237337b9673fd8fcd5 # v3.3.2
- uses: gradle/wrapper-validation-action@88425854a36845f9c881450d9660b5fd46bee142 # v3.4.2
- name: Set up JDK
uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 # v4.2.1
with:
Expand All @@ -84,6 +98,20 @@ jobs:
gradle-home-cache-cleanup: true
- name: Build
run: ./gradlew.bat build -PexcludeContainerised
- name: Upload Reports
if: failure()
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
with:
name: reports-win
path: '**/build/reports/**/*.xml'
retention-days: 5
- name: Upload Test Results
if: failure()
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
with:
name: test-results-win
path: '**/build/test-results/**/*.xml'
retention-days: 5

create-gh-release:
if: startsWith(github.ref, 'refs/tags/') && !endsWith(github.ref, '-alpha')
Expand Down
25 changes: 19 additions & 6 deletions buildSrc/src/main/kotlin/creek-common-convention.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
* <p>Apply to all java modules, usually excluding the root project in multi-module sets.
*
* <p>Versions:
* - 1.12: XML reporting for spotbugs
* - 1.11: Add explicit checkstyle tool version
* - 1.10: Add ability to exclude containerised tests
* - 1.9: Add `allDeps` task.
Expand Down Expand Up @@ -107,15 +108,27 @@ spotbugs {
excludeFilter.set(rootProject.file("config/spotbugs/suppressions.xml"))

tasks.spotbugsMain {
reports.create("html") {
required.set(true)
setStylesheet("fancy-hist.xsl")
reports {
create("html") {
required.set(true)
setStylesheet("fancy-hist.xsl")
}

create("xml") {
required.set(true)
}
}
}
tasks.spotbugsTest {
reports.create("html") {
required.set(true)
setStylesheet("fancy-hist.xsl")
reports {
create("html") {
required.set(true)
setStylesheet("fancy-hist.xsl")
}

create("xml") {
required.set(true)
}
}
}
}
Expand Down

0 comments on commit c27c428

Please sign in to comment.