Skip to content

Commit 0b40dcb

Browse files
committed
Start having some kind of useful tests for CI. We still need script examples!
1 parent 3cc0691 commit 0b40dcb

File tree

5 files changed

+53
-26
lines changed

5 files changed

+53
-26
lines changed

.ci-commands/project/test.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/usr/bin/env bash
2+
3+
npx textmate-tester \
4+
--textmateExtension scp-spherex \
5+
--syntax "$CI_NIX_FOLDER/syntaxes/scp.tmLanguage.json" \
6+
generate-specs --all
7+
8+
# FIXME: we need:
9+
#--examples "$FORNIX_FOLDER/language_examples/"

.github/workflows/ci-tests.yml

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
# https://snyk.io/blog/vs-code-extension-building-auto-cicd-with-github-actions/
1+
# DOCS:
2+
# https://snyk.io/blog/vs-code-extension-building-auto-cicd-with-github-actions/
3+
# https://code.visualstudio.com/api/working-with-extensions/continuous-integration#github-actions
4+
# https://github.com/jeff-hykin/better-cpp-syntax
25

36
on:
47
push:
@@ -25,11 +28,21 @@ jobs:
2528
uses: actions/checkout@v2
2629
- name: Setup Node.js
2730
uses: actions/setup-node@v1
28-
with:
29-
node-version: 12
30-
- name: Install dependencies
31-
run: npm install
32-
- name: Run headless test
33-
uses: GabrielBB/[email protected]
34-
with:
35-
run: npm test
31+
#with:
32+
# node-version: 10.x
33+
#- name: Install dependencies
34+
# run: npm install
35+
#- name: Run headless test (Mocha)
36+
#uses: GabrielBB/[email protected]
37+
#with:
38+
# run: |
39+
# npm test
40+
- name: Run headless test 1 (Basic)
41+
run: npm ci
42+
- name: Run headless test 2 (Validate grammar)
43+
# Test once the grammar. FIXME: we need SCP code examples!
44+
run: |
45+
export CI_NIX_FOLDER="$PWD"
46+
chmod +x .ci-commands/project/test.sh
47+
.ci-commands/project/test.sh
48+
if: runner.os == 'Linux'

.vscode/launch.json

Lines changed: 0 additions & 17 deletions
This file was deleted.

package-lock.json

Lines changed: 16 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,5 +38,11 @@
3838
"path": "./syntaxes/scp.tmLanguage.json"
3939
}
4040
]
41+
},
42+
"devDependencies": {
43+
"oniguruma": "^7.2.0",
44+
"textmate-bailout": "^1.1.0",
45+
"textmate-tester": "^1.1.9",
46+
"@vscode/vsce": "^1.103.1"
4147
}
4248
}

0 commit comments

Comments
 (0)