Skip to content

Commit

Permalink
Fixing build so develocity is correctly configured & tests execute
Browse files Browse the repository at this point in the history
  • Loading branch information
jdaugherty committed Dec 6, 2024
1 parent b0b41b2 commit d28dd7c
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 33 deletions.
27 changes: 16 additions & 11 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,22 +28,27 @@ jobs:
uses: gradle/actions/setup-gradle@v4
- name: "🔨 Run Base Tests"
env:
DEVELOCITY_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
DEVELOCITY_BUILD_CACHE_NODE_USER: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER }}
DEVELOCITY_BUILD_CACHE_NODE_KEY: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY }}
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
DEVELOCITY_BUILD_CACHE_NODE_USER: ${{ secrets.DEVELOCITY_BUILD_CACHE_NODE_USER }}
DEVELOCITY_BUILD_CACHE_NODE_KEY: ${{ secrets.DEVELOCITY_BUILD_CACHE_NODE_KEY }}
run: ./gradlew check
- name: "☄️ Upload Base Tests Results"
- name: "☄️ Upload Base Tests Results - audit-test"
uses: actions/upload-artifact@v4
with:
name: testreport-audit-test-${{ matrix.java }}
path: examples/audit-test/build/reports/tests
- name: "☄️ Upload Base Tests Results - audit-test-allow-update-outside-transaction"
uses: actions/upload-artifact@v4
with:
name: testreport-audit-test-allow-update-outside-transaction-${{ matrix.java }}
path: examples/audit-test-allow-update-outside-transaction/build/reports/tests
- name: "🔨 Run Tests Outside of Transaction"
- name: "🔨 Run audit-test Outside of Transaction Tests"
env:
DEVELOCITY_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
DEVELOCITY_BUILD_CACHE_NODE_USER: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER }}
DEVELOCITY_BUILD_CACHE_NODE_KEY: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY }}
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
DEVELOCITY_BUILD_CACHE_NODE_USER: ${{ secrets.DEVELOCITY_BUILD_CACHE_NODE_USER }}
DEVELOCITY_BUILD_CACHE_NODE_KEY: ${{ secrets.DEVELOCITY_BUILD_CACHE_NODE_KEY }}
run: ./gradlew :examples:audit-test:check -Daudit-test.AuditTrail.datasource=DEFAULT
- name: "☄️ Upload Outside of Transaction Tests Results"
- name: "☄️ Upload audit-test Outside of Transaction Tests Results"
uses: actions/upload-artifact@v4
with:
name: testreport-audit-test-single-datasource-${{ matrix.java }}
Expand All @@ -66,7 +71,7 @@ jobs:
uses: gradle/actions/setup-gradle@v4
- name: "📤 Publish to Snapshot (repo.grails.org)"
env:
DEVELOCITY_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
MAVEN_PUBLISH_USERNAME: ${{ secrets.MAVEN_PUBLISH_USERNAME }}
MAVEN_PUBLISH_PASSWORD: ${{ secrets.MAVEN_PUBLISH_PASSWORD }}
MAVEN_PUBLISH_URL: ${{ secrets.MAVEN_PUBLISH_SNAPSHOT_URL }}
Expand All @@ -75,7 +80,7 @@ jobs:
- name: "📜 Generate Documentation"
if: success()
env:
DEVELOCITY_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
working-directory: ./plugin
run: ../gradlew docs
- name: "🚀 Publish to Github Pages"
Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ jobs:
if: success()
id: assemble
env:
DEVELOCITY_BUILD_CACHE_NODE_USER: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER }}
DEVELOCITY_BUILD_CACHE_NODE_KEY: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY }}
DEVELOCITY_BUILD_CACHE_NODE_USER: ${{ secrets.DEVELOCITY_BUILD_CACHE_NODE_USER }}
DEVELOCITY_BUILD_CACHE_NODE_KEY: ${{ secrets.DEVELOCITY_BUILD_CACHE_NODE_KEY }}
run: ./gradlew assemble
- name: "📝 Generate secring file"
env:
Expand All @@ -64,8 +64,8 @@ jobs:
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
SIGNING_PASSPHRASE: ${{ secrets.SIGNING_PASSPHRASE }}
SECRING_FILE: ${{ secrets.SECRING_FILE }}
DEVELOCITY_BUILD_CACHE_NODE_USER: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER }}
DEVELOCITY_BUILD_CACHE_NODE_KEY: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY }}
DEVELOCITY_BUILD_CACHE_NODE_USER: ${{ secrets.DEVELOCITY_BUILD_CACHE_NODE_USER }}
DEVELOCITY_BUILD_CACHE_NODE_KEY: ${{ secrets.DEVELOCITY_BUILD_CACHE_NODE_KEY }}
working-directory: ./plugin
run: >
../gradlew
Expand Down Expand Up @@ -93,11 +93,11 @@ jobs:
- name: "🐘 Setup Gradle"
uses: gradle/actions/setup-gradle@v4
with:
develocity-access-key: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
develocity-access-key: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
- name: "🏆Nexus Staging Close And Release"
env:
DEVELOCITY_BUILD_CACHE_NODE_USER: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER }}
DEVELOCITY_BUILD_CACHE_NODE_KEY: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY }}
DEVELOCITY_BUILD_CACHE_NODE_USER: ${{ secrets.DEVELOCITY_BUILD_CACHE_NODE_USER }}
DEVELOCITY_BUILD_CACHE_NODE_KEY: ${{ secrets.DEVELOCITY_BUILD_CACHE_NODE_KEY }}
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
SONATYPE_STAGING_PROFILE_ID: ${{ secrets.SONATYPE_STAGING_PROFILE_ID }}
Expand Down Expand Up @@ -134,8 +134,8 @@ jobs:
- name: "📜 Generate Documentation"
id: docs
env:
DEVELOCITY_BUILD_CACHE_NODE_USER: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER }}
DEVELOCITY_BUILD_CACHE_NODE_KEY: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY }}
DEVELOCITY_BUILD_CACHE_NODE_USER: ${{ secrets.DEVELOCITY_BUILD_CACHE_NODE_USER }}
DEVELOCITY_BUILD_CACHE_NODE_KEY: ${{ secrets.DEVELOCITY_BUILD_CACHE_NODE_KEY }}
working-directory: ./plugin
run: ../gradlew docs
- name: "🚀 Publish to Github Pages"
Expand Down
11 changes: 11 additions & 0 deletions examples/audit-test-allow-update-outside-transaction/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -89,3 +89,14 @@ test {
exceptionFormat = 'full'
}
}

tasks.withType(Test).configureEach { Task it ->
useJUnitPlatform()

if (it.name == 'test') {
it.testLogging {
showStandardStreams = true
exceptionFormat = 'full'
}
}
}
30 changes: 17 additions & 13 deletions examples/audit-test/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -82,20 +82,24 @@ task wrapper(type: Wrapper) {
gradleVersion = gradleWrapperVersion
}

test {
testLogging {
showStandardStreams = true
exceptionFormat = 'full'
events = ["passed", "failed", "skipped", 'standardOut', 'standardError']
tasks.withType(Test).configureEach { Task it ->
useJUnitPlatform()

if (it.name == 'test') {
it.testLogging {
showStandardStreams = true
exceptionFormat = 'full'
events = ["passed", "failed", "skipped", 'standardOut', 'standardError']
}
}
}

integrationTest {
// Added to pass on audit-test.AuditTrail.datasource
systemProperties += System.properties
testLogging {
showStandardStreams = true
exceptionFormat = 'full'
events = ["passed", "failed", "skipped", 'standardOut', 'standardError']
if (it.name == 'integrationTest') {
// Added to pass on audit-test.AuditTrail.datasource
it.systemProperties += System.properties
it.testLogging {
showStandardStreams = true
exceptionFormat = 'full'
events = ["passed", "failed", "skipped", 'standardOut', 'standardError']
}
}
}

0 comments on commit d28dd7c

Please sign in to comment.