ci: run the raku grammar tests - #6175
Conversation
|
Note: If zef install App::Prove6
prove6 --lib t/ |
|
Good call — and it's what
Verified locally against Rakudo 2026.07And that it's a real gate — a probe test asserting |
prql-bot
left a comment
There was a problem hiding this comment.
The wiring checks out — main in the rules filter covers .github/**, so test-grammars ran on this PR rather than being skipped, and the three new steps all passed on e8ce7d1 (Setup Raku 4s, install 36s, tests 4s). One suggestion inline on the install step.
grammars/raku/ships a full test suite — 81 assertions across 10t/*.rakutestfiles — that CI has never run. Thetest-grammarsjob triggers ongrammars/**(so it already fires when the Raku grammar changes) but only builds and tests the lezer grammar. The one other Raku reference in the config,RAKU_RAKU_ARGUMENTSin.mega-linter.yaml, only compile-checks the sources; it doesn't execute the tests. So the grammar can drift from the language with no signal.This adds a
Raku/setup-raku@v1step and runs the suite withprove6inside the existingtest-grammarsjob, rather than a new job, so thecheck-ok-to-mergegate list doesn't need to change. The two existing lezer steps are renamed to saylezer, since the job now covers two grammars.There's no regression test here because this is the test coverage — it wires up a suite that already exists.
Verification
I ran the suite locally against Rakudo 2026.07 (the version
setup-raku@v1installs by default):The suite is a meaningful gate rather than one that always passes — dropping in a test that asserts
PRQL.parsesucceeds on garbage input givesResult: FAILEDand exit status 1, so the step fails.zefships inside the rakudo archivesetup-rakuinstalls (share/perl6/site/bin/zef, a directory the action adds toPATH), sozef install App::Prove6needs no extra setup. It took 39s locally, against ~4s for the tests themselves.prettier@3.9.6andactionlint@1.7.12(the versions pinned in.pre-commit-config.yaml) both pass on the edited workflow.