Skip to content

ci: add standalone demoapp tests workflow#1

Open
rstata wants to merge 4 commits intomainfrom
ci/standalone-demoapp-tests
Open

ci: add standalone demoapp tests workflow#1
rstata wants to merge 4 commits intomainfrom
ci/standalone-demoapp-tests

Conversation

@rstata
Copy link
Owner

@rstata rstata commented Mar 7, 2026

Summary

  • Adds .github/actions/setup-build composite action to consolidate the checkout/setup-java/setup-gradle sequence
  • Adds standalone-demoapp-tests.yml workflow: publishes Viaduct to Maven Local, then tests each demo app in isolation with USE_MAVEN_LOCAL=true
  • Updates post-slack-alerts.yml to also alert on failures in the new workflow

Test plan

  • publish-to-maven-local job completes and maven-local-repo artifact appears in the workflow run
  • All 4 test-demoapps matrix shards (cli-starter, jetty-starter, ktor-starter, micronaut-starter) run in parallel and pass
  • All 4 test-starwars matrix shards (ubuntu-latest × macos-latest × Java 17 × 21) run in parallel and pass

🤖 Generated with Claude Code

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 90e99833bb

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

path: ~/.m2/repository

- name: Test ${{ matrix.demoapp }}
run: cd demoapps/${{ matrix.demoapp }} && USE_MAVEN_LOCAL=true ./gradlew test --no-daemon

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Resolve standalone demoapp tests from Maven Local

USE_MAVEN_LOCAL=true in this step does not change Gradle repository selection: a repo-wide search (rg USE_MAVEN_LOCAL) finds no code that reads it, and most standalone demoapp settings files (demoapps/cli-starter/settings.gradle.kts, demoapps/jetty-starter/settings.gradle.kts, demoapps/micronaut-starter/settings.gradle.kts, demoapps/starwars/settings.gradle.kts) only configure mavenCentral()/gradlePluginPortal() (no mavenLocal()). Because these apps are pinned to viaductVersion=0.24.0-SNAPSHOT, this workflow will still try to resolve snapshots from Maven Central and fail instead of using the uploaded ~/.m2/repository artifact.

Useful? React with 👍 / 👎.

@rstata rstata force-pushed the ci/standalone-demoapp-tests branch 3 times, most recently from 26386fa to a3897f3 Compare March 8, 2026 11:03
Raymie Stata and others added 4 commits March 8, 2026 18:40
…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>
@rstata rstata force-pushed the ci/standalone-demoapp-tests branch from a3897f3 to 1859a8c Compare March 8, 2026 18:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant