|
1 | 1 | name: CI
|
2 | 2 |
|
3 | 3 | on:
|
4 |
| - pull_request: |
5 |
| - branches: |
6 |
| - - '**' |
7 | 4 | push:
|
8 |
| - branches: |
9 |
| - - 'main' |
| 5 | + branches: [main] |
| 6 | + paths: |
| 7 | + - grammar.js |
| 8 | + - src/** |
| 9 | + - test/** |
| 10 | + - bindings/** |
| 11 | + - binding.gyp |
| 12 | + pull_request: |
| 13 | + paths: |
| 14 | + - grammar.js |
| 15 | + - src/** |
| 16 | + - test/** |
| 17 | + - bindings/** |
| 18 | + - binding.gyp |
10 | 19 |
|
11 | 20 | concurrency:
|
12 |
| - group: ${{ github.workflow }}-${{ github.ref }} |
| 21 | + group: ${{github.workflow}}-${{github.ref}} |
13 | 22 | cancel-in-progress: true
|
14 | 23 |
|
15 | 24 | jobs:
|
16 | 25 | test:
|
17 |
| - name: Run validation tests |
18 |
| - runs-on: ${{ matrix.os }} |
| 26 | + name: Test parser |
| 27 | + runs-on: ${{matrix.os}} |
19 | 28 | strategy:
|
20 |
| - fail-fast: true |
| 29 | + fail-fast: false |
21 | 30 | matrix:
|
22 |
| - os: [macos-latest, ubuntu-latest, windows-latest] |
| 31 | + os: [ubuntu-latest, windows-latest, macos-14] |
23 | 32 | steps:
|
24 | 33 | - name: Checkout repository
|
25 |
| - uses: actions/checkout@v3 |
26 |
| - - name: Install Node.js |
27 |
| - uses: actions/setup-node@v3 |
| 34 | + uses: actions/checkout@v4 |
| 35 | + - name: Set up tree-sitter |
| 36 | + uses: tree-sitter/setup-action/cli@v1 |
| 37 | + - name: Run tests |
| 38 | + uses: tree-sitter/parser-test-action@v2 |
28 | 39 | with:
|
29 |
| - node-version: '20.10.x' |
30 |
| - registry-url: 'https://registry.npmjs.org' |
31 |
| - - name: Install dependencies |
32 |
| - run: npm ci |
33 |
| - - name: Run tree-sitter tests |
34 |
| - run: npm test |
35 |
| - - name: Ensure generated parser files are up-to-date |
36 |
| - # On Windows and Macos, tree-sitter generate results in a diff, not sure why |
37 |
| - if: runner.os != 'Windows' && runner.os != 'macOS' |
38 |
| - run: | |
39 |
| - git status |
40 |
| - test -z "$(git status --porcelain)" |
| 40 | + test-rust: ${{runner.os == 'Linux'}} |
0 commit comments