Skip to content

Add template validation infrastructure with scripted tests#65

Draft
Copilot wants to merge 4 commits intomainfrom
copilot/add-support-scripts-for-validation
Draft

Add template validation infrastructure with scripted tests#65
Copilot wants to merge 4 commits intomainfrom
copilot/add-support-scripts-for-validation

Conversation

Copy link
Copy Markdown

Copilot AI commented Jan 17, 2026

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 tests
  • Integrated with sbt's g8Test task: sbt test now validates the template
  • Uses existing sbt-giter8 and scripted plugins from build.sbt

Template Test Files

  • src/main/g8/src/test/scala/$package$/MainSpec.scala - Basic compilation and instantiation tests
  • src/main/g8/src/test/scala/$package$/ServerSpec.scala - HTTP route tests with response body validation
  • Uses munit framework already in template dependencies

Standalone Scripts

  • validate-template-sbt.sh - Wrapper for sbt g8Test
  • validate-template.sh - Uses g8 CLI to generate and validate project

Documentation

  • TESTING.md - Complete testing guide with CI integration examples
  • Updated README.md with quick validation instructions

Configuration

  • Added src/sbt-test/ to .gitignore (generated test artifacts)

CI Integration

- name: Validate template
  run: sbt test

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
    • Triggering command: /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
    • Triggering command: /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

this project is a gitter8 template, for a scala cats project. It is lacking the ability to test it self that the project is not broken. Add functionality to validate it's workinf by outputting the tempmate and making its test passing. This will
be later integrated into CI like guthub actions, but for the moment create the support scripts


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 3 commits January 17, 2026 22:29
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
Copilot AI requested a review from nachinius January 17, 2026 22:32
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.

2 participants