ci: add standalone demoapp tests workflow#296
Closed
rstata wants to merge 4 commits intoairbnb:mainfrom
Closed
Conversation
26386fa to
a3897f3
Compare
…e it Introduces .github/actions/setup-build, a composite action that wraps setup-java and setup-gradle in one reusable step. Migrates all five jobs in build-and-test.yml to use it, removing the now-redundant inline setup-java, setup-gradle, and actions/cache steps from each job. The build job uses the default cache-read-only=false so it can write the Gradle User Home cache. The four downstream jobs (test, detekt, ktlint, coverage-verification) pass cache-read-only=true — they only need to read the cache written by the build job, and writing from all four simultaneously wastes cache quota and risks evicting useful entries. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds a GitHub Actions workflow that publishes Viaduct to Maven Local and tests each demo app against those published artifacts in isolation (USE_MAVEN_LOCAL=true), catching dependency-packaging bugs that composite builds mask via source substitution. - New workflow standalone-demoapp-tests.yml with three jobs: publish-to-maven-local (ubuntu/Java 21), test-demoapps (4-app matrix, ubuntu/Java 21), test-starwars (ubuntu × Java 17+21 matrix) - Uses setup-build composite action for Java/Gradle setup; test jobs pass cache-read-only=true to avoid redundant cache writes - Maven Local artifact upload uses compression-level=0 (JARs are already compressed) and retention-days=1 (only needed within the run) - Adds USE_MAVEN_LOCAL support to demoapps/micronaut-starter so it can resolve Viaduct from Maven Local instead of the composite build - Updates post-slack-alerts.yml to alert on the new workflow's failures Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Three pre-existing issues in build-logic that became visible when
running publishToMavenLocal more carefully:
- build-logic:shared applied kotlin-dsl, which pulls in java-gradle-plugin
and auto-creates a pluginMaven publication. Combined with the explicit
maven publication, this produced duplicate publications and a spurious
"no valid plugin descriptors" warning. Fixed by switching to kotlin("jvm")
(shared has no Gradle API dependencies) and keeping one explicit publication.
- test-fixtures and tools publish Gradle capability variants that cannot
be expressed in Maven POM format, generating noisy metadata warnings.
Suppressed with suppressPomMetadataWarningsFor().
- versioning.gradle.kts logged the resolved version at lifecycle level on
every build. Downgraded to info.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Introduces a publishMinimal Gradle property that strips out everything not needed when publishing to Maven Local for local integration testing: - Skips Dokka javadoc generation and sources jars in viaduct-publishing convention (JavadocJar.Empty(), sourcesJar=false) - Excludes the x/javaapi modules entirely from the build graph via included-builds/core/settings.gradle.kts, avoiding their heavyweight annotation processing and compilation The standalone-demoapp-tests workflow passes -PpublishMinimal to the publishToMavenLocal step to take advantage of this. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
a3897f3 to
1859a8c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes the first half of #295, which is to build and test demo apps as "external" builds. (The second half — removing demoapps from the composite build — is a separate change.)
To do this, a new
Standalone Demo App Testsworkflow publishes all Viaduct artifacts to Maven Local and then tests each demo app in isolation — exactly as an external consumer would use them. This catches dependency-packaging bugs that composite builds hide via source substitution.Commits
ci: add setup-build composite action and migrate build-and-test to use itExtracts the
setup-java→setup-gradlesequence into.github/actions/setup-build, a composite action with acache-read-onlyinput. Migrates all five jobs inbuild-and-test.ymlto use it, removing the redundant inline steps and theactions/cachesteps that were duplicating whatgradle/actions/setup-gradlealready manages. Downstream jobs (test,detekt,ktlint,coverage-verification) passcache-read-only: true— only thebuildjob needs to write the cache.ci: add standalone demoapp tests workflowThree-job workflow in
.github/workflows/standalone-demoapp-tests.yml:publish-to-maven-local./gradlew publishToMavenLocal; uploads~/.m2/repositoryas a workflow artifacttest-demoappsUSE_MAVEN_LOCAL=true ./gradlew testfor each app in paralleltest-starwarsworkflow_dispatch)Also adds
USE_MAVEN_LOCALsupport to all demoapps'settings.gradle.ktsfiles and adds the new workflow topost-slack-alerts.yml.The default
test-starwarsmatrix uses Ubuntu only. macOS runner provisioning added ~4 min of queue time with no meaningful benefit (Viaduct publishes platform-independent JARs). macOS can still be selected viaworkflow_dispatch.fix(build-logic): clean up warnings surfaced by publishToMavenLocalRunning
publishToMavenLocalcarefully exposed three pre-existing issues:build-logic:sharedappliedkotlin-dsl, which internally appliesjava-gradle-pluginand auto-creates apluginMavenpublication. Combined with an explicitmavenpublication this produced duplicate publications and a spurious "no valid plugin descriptors" warning. Fixed by switching tokotlin("jvm")(shared has no Gradle API dependencies).test-fixturesandtoolspublish Gradle capability variants that cannot be expressed in Maven POM format, producing noisy metadata warnings. Suppressed withsuppressPomMetadataWarningsFor().versioning.gradle.ktslogged the resolved version atlifecyclelevel on every build. Downgraded toinfo.perf(ci): add publishMinimal mode to speed up Maven Local publishingIntroduces a
publishMinimalGradle property that strips everything unnecessary from thepublishToMavenLocalpath: skips Dokka javadoc generation and sources jars, and excludes thex/javaapimodules entirely from the build graph (avoiding their heavyweight annotation processing). The standalone workflow passes-PpublishMinimalto take advantage of this.Testing
Verified on rstata/viaduct#1:
publish-to-maven-localcompletes andmaven-local-repoartifact is visible in the runtest-demoappsmatrix shards pass in paralleltest-starwarsJava shards (17, 21) pass on Ubuntucollect-failure-infois skipped (no failures)🤖 Generated with Claude Code