-
-
Notifications
You must be signed in to change notification settings - Fork 0
78 lines (75 loc) · 2.05 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
name: CI
on:
push:
branches: [master]
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:
# NOTE: fuzz before tests to catch scanner hanging
fuzz:
name: Fuzz parser
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Fuzz parser
uses: tree-sitter-grammars/tree-sitter-fuzz-action@v3
with:
max-time: 20
max-length: 1024
test:
name: Test parser
runs-on: ${{matrix.os}}
needs: [fuzz]
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-14]
steps:
- name: Set up repository
uses: tree-sitter-grammars/actions/setup@main
with:
node-version: ${{vars.NODE_VERSION}}
- name: Allow long paths
if: ${{runner.os == 'Windows'}}
shell: sh
run: git config --global core.longpaths true
- name: Clone Quarkus corpus
uses: actions/checkout@v4
with:
path: examples/quarkus
repository: quarkusio/quarkus
sparse-checkout-cone-mode: false
sparse-checkout: |-
**/*.properties
!/independent-projects/tools/**
!/devtools/project-core-extension-codestarts/**
ref: 8ff8180fd5d629621ee2807b32024520c7693c42
- name: Clone Spring Boot corpus
uses: actions/checkout@v4
with:
path: examples/spring-boot
repository: spring-projects/spring-boot
sparse-checkout-cone-mode: false
sparse-checkout: "**/*.properties"
- name: Run tests
uses: tree-sitter-grammars/actions/test@main
with:
test-library: ${{runner.os == 'Linux'}}
examples: |-
examples/quarkus/**/*.properties
examples/spring-boot/**/*.properties