Skip to content

Add a compile-check test and CI workflow#89

Open
tomjn wants to merge 1 commit into
Yaribz:masterfrom
tomjn:feature/ci-compile-check
Open

Add a compile-check test and CI workflow#89
tomjn wants to merge 1 commit into
Yaribz:masterfrom
tomjn:feature/ci-compile-check

Conversation

@tomjn

@tomjn tomjn commented Jun 22, 2026

Copy link
Copy Markdown

What

Adds the first automated check to the repository:

  • t/00-compile.t runs perl -c on every source under src/. The sibling
    modules (SimpleLog, SimpleEvent, SpringLobbyInterface,
    SpringAutoHostInterface, SpringLobbyProtocol) are fetched at install time
    and not vendored here, so the test generates minimal stubs for them, just
    enough for a compile check.
  • .github/workflows/compile.yml runs the test via prove on push and pull
    request, using only core Perl modules (no dependency installation needed).

Why

There is currently no automated test of any kind. This is the cheapest possible
regression net: it catches parse/compile errors, lexical-scope mistakes, and
strict violations across the whole tree on every change. It deliberately does
NOT attempt to verify runtime behaviour (that needs a real Spring/unitsync
install), so it stays fast, hermetic, and dependency-free.

Verified locally: prove -v t/ passes (9/9 sources compile).

Note

This is a proposal and imposes a small amount of CI maintenance, so feel free to
treat it as a starting point or close it if the approach isn't wanted. It's the
foundation a few follow-ups (a cpanfile, a perlcritic step, and eventually unit
tests around the config/data layer) would build on, but each of those is kept as
its own separate PR.

SPADS has no automated tests. This adds the cheapest possible regression net:
t/00-compile.t runs 'perl -c' on every source under src/, using generated stubs
for the sibling modules (SimpleLog, SimpleEvent, SpringLobbyInterface,
SpringAutoHostInterface, SpringLobbyProtocol) that are fetched at install time
and not vendored here.

It verifies the sources parse and compile (catching e.g. lexical-scope and
strict violations); it does not verify runtime behaviour. A GitHub Actions
workflow runs it via 'prove' on push and pull_request using only core Perl
modules (no dependency install needed).
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