All checks were successful
CI / Grammar, queries & corpus (pull_request) Successful in 17s
51 lines
1.3 KiB
YAML
51 lines
1.3 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
# Weekly, so a vendored @gram-lang/parser is noticed once its release is out.
|
|
schedule:
|
|
- cron: "0 6 * * 1"
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
ci:
|
|
name: Grammar, queries & corpus
|
|
runs-on: docker
|
|
container:
|
|
# Full image: git and a C compiler, for tree-sitter test and the corpus fetch.
|
|
# Trixie, not bookworm: the tree-sitter-cli 0.26 binary needs glibc 2.39.
|
|
image: node:22.23.5-trixie
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Install dependencies
|
|
run: npm ci
|
|
|
|
- name: Generated parser is up to date
|
|
run: |
|
|
npx tree-sitter generate
|
|
git diff --exit-code -- src/
|
|
test -z "$(git status --porcelain -- src/)"
|
|
|
|
- name: Corpus and highlight tests
|
|
run: npx tree-sitter test
|
|
|
|
- name: Generated queries are up to date and compile
|
|
run: npm run queries:check
|
|
|
|
- name: Conformance corpus parses without ERROR or MISSING
|
|
run: |
|
|
npm run conformance:fetch
|
|
npm run conformance
|
|
|
|
- name: Cutting oracle against @gram-lang/parser
|
|
run: npm run oracle
|
|
|
|
- name: Vendored @gram-lang/parser not outliving its release
|
|
run: npm run parser:check
|