Add template validation infrastructure with scripted tests#65
Draft
Add template validation infrastructure with scripted tests#65
Conversation
Co-authored-by: nachinius <222807+nachinius@users.noreply.github.com>
Co-authored-by: nachinius <222807+nachinius@users.noreply.github.com>
Co-authored-by: nachinius <222807+nachinius@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add support scripts to validate gitter8 template
Add template validation infrastructure with scripted tests
Jan 17, 2026
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.
The giter8 template lacked automated validation to verify it generates working projects. This prevented CI integration and made it difficult to catch breaking changes.
Changes
Test Infrastructure
src/test/g8/test- Scripted test that generates a project, compiles it, and runs testssbt testnow validates the templatebuild.sbtTemplate Test Files
src/main/g8/src/test/scala/$package$/MainSpec.scala- Basic compilation and instantiation testssrc/main/g8/src/test/scala/$package$/ServerSpec.scala- HTTP route tests with response body validationStandalone Scripts
validate-template-sbt.sh- Wrapper forsbt g8Testvalidate-template.sh- Uses g8 CLI to generate and validate projectDocumentation
TESTING.md- Complete testing guide with CI integration examplesREADME.mdwith quick validation instructionsConfiguration
src/sbt-test/to.gitignore(generated test artifacts)CI Integration
The validation generates a test project in
src/sbt-test/, compiles it, and runs its tests to ensure the template produces working code.Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
repo.scala-sbt.org/usr/lib/jvm/temurin-17-jdk-amd64/bin/java /usr/lib/jvm/temurin-17-jdk-amd64/bin/java -Xms1024m -Xmx1024m -XX:ReservedCodeCacheSize=128m -Xss2m -Dfile.encoding=UTF-8 -Dsbt.global.base=/tmp/sbt_87ea09b2/global -Dsbt.scripted=true -jar /home/REDACTED/.cache/coursier/v1/https/repo1.maven.org/maven2/org/scala-sbt/sbt-launch/1.10.0/sbt-launch-1.10.0.jar <58004 git conf�� unset --global cal/bin/bash user.email(dns block)repo.typesafe.com/usr/lib/jvm/temurin-17-jdk-amd64/bin/java /usr/lib/jvm/temurin-17-jdk-amd64/bin/java -Xms1024m -Xmx1024m -XX:ReservedCodeCacheSize=128m -Xss2m -Dfile.encoding=UTF-8 -Dsbt.global.base=/tmp/sbt_87ea09b2/global -Dsbt.scripted=true -jar /home/REDACTED/.cache/coursier/v1/https/repo1.maven.org/maven2/org/scala-sbt/sbt-launch/1.10.0/sbt-launch-1.10.0.jar <58004 git conf�� unset --global cal/bin/bash user.email(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.