Add CI workflow running grammar checks and corpus tests - #2
Merged
Conversation
Runs 'make check' and 'make test' on pushes to main and on pull requests. ts-bnf-tool has no prebuilt binaries, so it and the tree-sitter CLI are cargo-installed at pinned versions (matching the local toolchain: ts-bnf-tool 0.4.0, tree-sitter-cli 0.26.11) and the resulting binaries cached, keyed on those versions. Action steps are pinned to commit SHAs.
The published 0.4.0 predates the diamond-include fix (ambs/ tree-sitter-bnf-tools#302), so it merged literals.bnf and pou.bnf twice (each is %included via two paths) and 'make check' failed with 248 'rule defined more than once' warnings - locally invisible because the local install was built from a post-fix checkout. 0.5.0 includes the fix; verified clean against this grammar with the actual crates.io binary before bumping.
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.
Adds
.github/workflows/tests.yml, running on pushes tomainand on pull requests:make check— ts-bnf-tool static checks on the BNF sourcemake test— regenerates the parser and runs thetests/*.txtcorpusToolchain:
ts-bnf-toolhas no prebuilt binaries, so it and thetree-sitterCLI arecargo installed at pinned versions matching the local toolchain (ts-bnf-tool 0.4.0, tree-sitter-cli 0.26.11). The built binaries are cached keyed on those versions, so only the first run (and version bumps) pays the compile cost.Supply-chain: action steps are pinned to full commit SHAs (checkout v7.0.1, cache v6.1.0).