Skip to content

Initial commit

Initial commit #1

Workflow file for this run

name: CI
on:
push:
branches:
- master
- main
paths:
- grammar.js
- src/**
- test/**
- bindings/**
- binding.gyp
pull_request:
paths:
- grammar.js
- src/**
- test/**
- bindings/**
- binding.gyp
concurrency:
group: ${{github.workflow}}-${{github.ref}}
cancel-in-progress: true
jobs:
test:
name: Test parser
runs-on: ${{matrix.os}}
if: >-
!github.event.repository.is_template &&
github.event.head_commit.message != 'Initial commit' &&
github.event.head_commit.message != 'feat: initial commit'
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-14]
steps:
- name: Set up repository
uses: tree-sitter/[email protected]
with:
node-version: ${{vars.NODE_VERSION || '20'}}
- name: Run tests
uses: tree-sitter/[email protected]
with:
test-library: ${{runner.os == 'Linux'}}
- name: Check for scanner changes
id: scanner-check
shell: sh
run: |-
{
test -f src/scanner.c && ! git diff --quiet -- "$_" &&
printf 'changed=true\n' || printf 'changed=false\n'
} >> "$GITHUB_OUTPUT"
- name: Fuzz scanner
uses: tree-sitter/fuzz-action@v4
if: steps.scanner-check.outputs.changed == 'true'