VSpaceCode / vscode-which-key

which-key like menu for Visual Studio Code
https://vspacecode.github.io/docs/whichkey
MIT License
166 stars 18 forks source link

Test and lint in gh actions #50

Closed stevenguh closed 3 years ago

stevenguh commented 3 years ago

Test and lint in gh actions

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 https://github.com/microsoft/vscode/issues/85779