Skip to content

Add CI workflow running grammar checks and corpus tests - #2

Merged
simoes-tiobe merged 2 commits into
mainfrom
PR/CI
Jul 28, 2026
Merged

Add CI workflow running grammar checks and corpus tests#2
simoes-tiobe merged 2 commits into
mainfrom
PR/CI

Conversation

@simoes-tiobe

Copy link
Copy Markdown
Contributor

Adds .github/workflows/tests.yml, running on pushes to main and on pull requests:

  • make check — ts-bnf-tool static checks on the BNF source
  • make test — regenerates the parser and runs the tests/*.txt corpus

Toolchain: 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). 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).

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.
@simoes-tiobe
simoes-tiobe merged commit a1faa60 into main Jul 28, 2026
1 check passed
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