Skip to content

Commit

Permalink
ci: use upstream actions
Browse files Browse the repository at this point in the history
  • Loading branch information
ObserverOfTime committed Feb 28, 2024
1 parent 78c7120 commit bcd4762
Show file tree
Hide file tree
Showing 5 changed files with 1,199 additions and 11 deletions.
36 changes: 29 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,46 @@
name: Test grammar
name: CI

on:
push:
branches:
- main
branches: [master]
paths:
- grammar.js
- src/**
- test/**
- bindings/**
- binding.gyp
pull_request:
paths:
- grammar.js
- src/**
- test/**
- bindings/**
- binding.gyp

jobs:
test:
uses: tree-sitter-grammars/.github/.github/workflows/ci.yml@main
with:
# NOTE: change to true to also test the rust library:
test-library: false
name: Run tests
runs-on: ${{matrix.os}}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-14]
steps:
- uses: tree-sitter/[email protected]
with:
node-version: ${{vars.NODE_VERSION}}
- uses: tree-sitter/[email protected]
fuzz:
name: Fuzz parser
runs-on: ubuntu-latest
steps:
- name: Check for scanner changes
id: scanner-changes
run: |-
if git diff --quiet HEAD^ -- src/scanner.c; then
printf 'changed=false\n' >> "$GITHUB_OUTPUT"
else
printf 'changed=true\n' >> "$GITHUB_OUTPUT"
fi
- uses: tree-sitter/fuzz-action@v4
if: steps.scanner-changes.outputs.changed == 'true'
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
build
node_modules
package-lock.json
parser
Loading

0 comments on commit bcd4762

Please sign in to comment.