-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: add workflows (format, lint, test)
- Loading branch information
1 parent
19d3723
commit 5c538f4
Showing
3 changed files
with
95 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: Format (check only) | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
- name: Set up Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
cache: npm | ||
node-version: latest | ||
- name: Install modules | ||
run: npm ci | ||
- name: Run ESLint | ||
run: npm run check-format |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: ["*"] | ||
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: | ||
test: | ||
name: Test parser | ||
runs-on: ${{matrix.os}} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest, windows-latest, macos-14] | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
- name: Set up tree-sitter | ||
uses: tree-sitter/setup-action/cli@v1 | ||
- name: Set up examples | ||
run: |- | ||
git clone https://github.com/cylc/cylc-flow examples/cylc-flow --single-branch --depth=1 --filter=blob:none | ||
- name: Run tests | ||
uses: tree-sitter/parser-test-action@v2 | ||
with: | ||
test-rust: ${{runner.os == 'Linux'}} | ||
- name: Parse examples | ||
uses: tree-sitter/parse-action@v4 | ||
with: | ||
files: examples/**/*.cylc |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: Lint | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
paths: | ||
- grammar.js | ||
pull_request: | ||
paths: | ||
- grammar.js | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
- name: Set up Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
cache: npm | ||
node-version: latest | ||
- name: Install modules | ||
run: npm ci | ||
- name: Run ESLint | ||
run: npm run lint |