Skip to content

Commit

Permalink
Start having some kind of useful tests for CI. We still need script e…
Browse files Browse the repository at this point in the history
…xamples!
  • Loading branch information
cbnolok committed Oct 19, 2023
1 parent 3cc0691 commit 0b40dcb
Show file tree
Hide file tree
Showing 5 changed files with 53 additions and 26 deletions.
9 changes: 9 additions & 0 deletions .ci-commands/project/test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/usr/bin/env bash

npx textmate-tester \
--textmateExtension scp-spherex \
--syntax "$CI_NIX_FOLDER/syntaxes/scp.tmLanguage.json" \
generate-specs --all

# FIXME: we need:
#--examples "$FORNIX_FOLDER/language_examples/"
31 changes: 22 additions & 9 deletions .github/workflows/ci-tests.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# https://snyk.io/blog/vs-code-extension-building-auto-cicd-with-github-actions/
# DOCS:
# https://snyk.io/blog/vs-code-extension-building-auto-cicd-with-github-actions/
# https://code.visualstudio.com/api/working-with-extensions/continuous-integration#github-actions
# https://github.com/jeff-hykin/better-cpp-syntax

on:
push:
Expand All @@ -25,11 +28,21 @@ jobs:
uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v1
with:
node-version: 12
- name: Install dependencies
run: npm install
- name: Run headless test
uses: GabrielBB/[email protected]
with:
run: npm test
#with:
# node-version: 10.x
#- name: Install dependencies
# run: npm install
#- name: Run headless test (Mocha)
#uses: GabrielBB/[email protected]
#with:
# run: |
# npm test
- name: Run headless test 1 (Basic)
run: npm ci
- name: Run headless test 2 (Validate grammar)
# Test once the grammar. FIXME: we need SCP code examples!
run: |
export CI_NIX_FOLDER="$PWD"
chmod +x .ci-commands/project/test.sh
.ci-commands/project/test.sh
if: runner.os == 'Linux'
17 changes: 0 additions & 17 deletions .vscode/launch.json

This file was deleted.

16 changes: 16 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,11 @@
"path": "./syntaxes/scp.tmLanguage.json"
}
]
},
"devDependencies": {
"oniguruma": "^7.2.0",
"textmate-bailout": "^1.1.0",
"textmate-tester": "^1.1.9",
"@vscode/vsce": "^1.103.1"
}
}

0 comments on commit 0b40dcb

Please sign in to comment.