💚 run ci on more file changes #5
This file contains 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
name: CI | |
on: | |
push: | |
branches: [main] | |
paths: | |
- grammar.js | |
- src/** | |
- test/** | |
- bindings/** | |
- binding.gyp | |
- examples/** | |
- .github/workflows/ci.yml | |
- queries/** | |
pull_request: | |
paths: | |
- grammar.js | |
- src/** | |
- test/** | |
- bindings/** | |
- binding.gyp | |
- examples/** | |
- .github/workflows/ci.yml | |
- queries/** | |
concurrency: | |
group: ${{github.workflow}}-${{github.ref}} | |
cancel-in-progress: true | |
jobs: | |
test: | |
name: Test parser | |
runs-on: ${{matrix.os}} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-14] | |
node-version: [22] | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Install pnpm | |
uses: pnpm/action-setup@v4 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: "pnpm" | |
- name: Install dependencies | |
run: pnpm install | |
- name: Set up tree-sitter | |
uses: tree-sitter/setup-action/cli@v1 | |
- name: Run tests | |
uses: tree-sitter/parser-test-action@v2 | |
with: | |
test-rust: ${{runner.os == 'Linux'}} | |
test-node: true | |
test-python: true | |
test-go: true | |
test-swift: ${{runner.os == 'macOS'}} | |
- name: Parse examples | |
uses: tree-sitter/parse-action@v4 | |
with: | |
files: examples/* |