Add a compile-check test and CI workflow#89
Open
tomjn wants to merge 1 commit into
Open
Conversation
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).
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.
What
Adds the first automated check to the repository:
t/00-compile.trunsperl -con every source undersrc/. The siblingmodules (
SimpleLog,SimpleEvent,SpringLobbyInterface,SpringAutoHostInterface,SpringLobbyProtocol) are fetched at install timeand not vendored here, so the test generates minimal stubs for them, just
enough for a compile check.
.github/workflows/compile.ymlruns the test viaproveon push and pullrequest, 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
strictviolations across the whole tree on every change. It deliberately doesNOT 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 unittests around the config/data layer) would build on, but each of those is kept as
its own separate PR.