-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This commits add steps to lint and test extension before we publish on tagging. In addition, another gh action is added to lint and test for all pushes and PRs. `xvfb-run` is used gh action so the vscode can run in a virtual X server when running in the ubuntu testing environment. npe is added as dev dependency and being used to change `main` of `package.json` in pre and post test. When building to debug or deploy, webpack is used which outputs a single script file to `dist/extension.js`; When compile for test, typescript compiler (tsc) is used which outputs transpiled js files to `out`. The path to `main` needs to be changed to `out/extension.js` to accommodate the output of tsc, so our extension launched can be activated in the test vscode instance. See microsoft/vscode#85779
Showing
4 changed files
with
95 additions
and
7 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,23 @@ | ||
on: [push, pull_request] | ||
|
||
name: Build Extension | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout vscode-which-key | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up node.js | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: 12 | ||
|
||
- name: Install dependencies | ||
uses: bahmutov/npm-install@v1 | ||
|
||
- name: Lint | ||
run: npm run lint | ||
|
||
- name: Test | ||
run: xvfb-run -a npm run test |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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