ci: parse examples from systemd & openSUSE #7
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: [master] | |
paths: | |
- grammar.js | |
- src/** | |
- bindings/** | |
- binding.gyp | |
pull_request: | |
paths: | |
- grammar.js | |
- src/** | |
- bindings/** | |
- binding.gyp | |
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] | |
steps: | |
- name: Set up repository | |
uses: tree-sitter-grammars/actions/setup@main | |
with: | |
node-version: ${{vars.NODE_VERSION}} | |
- name: Relax filename restrictions | |
if: ${{runner.os == 'Windows'}} | |
run: git config --global core.protectNTFS false | |
- name: Clone systemd rules | |
uses: actions/checkout@v4 | |
with: | |
path: examples/systemd | |
repository: systemd/systemd | |
sparse-checkout: |- | |
rules.d/ | |
test/fuzz/fuzz-udev-rules/ | |
- name: Clone openSUSE rules | |
uses: actions/checkout@v4 | |
with: | |
path: examples/udev-extra-rules | |
repository: openSUSE/udev-extra-rules | |
- name: Run tests | |
uses: tree-sitter-grammars/actions/test@main | |
with: | |
test-library: ${{runner.os == 'Linux'}} | |
examples: |- | |
examples/systemd/rules.d/*.rules | |
examples/systemd/test/fuzz/fuzz-udev-rules/*.rules | |
examples/udev-extra-rules/*.rules |