Skip to content

Commit 715ce71

Browse files
authored
feat(ci): run linter and grammar checks (#28)
1 parent 79449e2 commit 715ce71

File tree

3 files changed

+11
-4
lines changed

3 files changed

+11
-4
lines changed

.github/workflows/grammars.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ name: Building tree-sitter grammars
33
on:
44
pull_request:
55
branches:
6-
- master
6+
- main
77
push:
88
branches:
9-
- master
9+
- main
1010

1111
concurrency:
1212
group: ${{ github.workflow }}-${{ github.ref }}
@@ -57,3 +57,6 @@ jobs:
5757

5858
- name: Build WASM
5959
run: yarn grammar:wasm
60+
61+
- name: Test parsers
62+
run: yarn test:grammars

.github/workflows/linter.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ name: Linter checks
33
on:
44
pull_request:
55
branches:
6-
- master
6+
- main
77
push:
88
branches:
9-
- master
9+
- main
1010

1111
env:
1212
HUSKY: 0

package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@
4848
"grammar:tlb:wasm": "cd server/src/languages/tlb/tree-sitter-tlb && tree-sitter generate && tree-sitter build --wasm",
4949
"watch": "webpack --watch",
5050
"precommit": "yarn build && yarn fmt && yarn lint",
51+
"test:grammars": "yarn test:grammars:tolk && yarn test:grammars:fift && yarn test:grammars:tlb",
52+
"test:grammars:tolk": "cd ./server/src/languages/tolk/tree-sitter-tolk/ && tree-sitter test",
53+
"test:grammars:fift": "cd ./server/src/languages/fift/tree-sitter-fift/ && tree-sitter test",
54+
"test:grammars:tlb": "cd ./server/src/languages/tlb/tree-sitter-tlb/ && tree-sitter test",
5155
"test:e2e": "yarn test:e2e:tolk",
5256
"test:e2e:compile": "tsc -p ./server/src/e2e/tsconfig.json",
5357
"test:e2e:tolk": "yarn test:e2e:compile && ts-node server/src/e2e/runTolkTest.ts",

0 commit comments

Comments
 (0)