File tree Expand file tree Collapse file tree 17 files changed +433
-15
lines changed
Expand file tree Collapse file tree 17 files changed +433
-15
lines changed Original file line number Diff line number Diff line change @@ -3,8 +3,8 @@ name: Node CI Build
33on : push
44
55jobs :
6- build :
7- runs-on : ubuntu-latest
6+ build-test-linux :
7+ runs-on : ubuntu-18.04
88
99 strategy :
1010 matrix :
@@ -16,11 +16,41 @@ jobs:
1616 uses : actions/setup-node@v1
1717 with :
1818 node-version : ${{ matrix.node-version }}
19- - name : Test & build extension
19+ - uses : actions/setup-java@v1
20+ with :
21+ java-version : ' 12.0.2'
22+ architecture : x64
23+ - name : Install OS dependencies
2024 run : |
21- sudo apt-get install xvfb
25+ sudo apt install xvfb
2226 export DISPLAY=':99.0'
2327 Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
28+ - name : Build & test extension
29+ run : |
30+ npm ci
31+ npm run lint
32+ npm test
33+
34+ build-test-windows :
35+ runs-on : windows-2019
36+
37+ strategy :
38+ matrix :
39+ node-version : [12.x]
40+
41+ steps :
42+ - uses : actions/checkout@v1
43+ - name : Use Node.js ${{ matrix.node-version }}
44+ uses : actions/setup-node@v1
45+ with :
46+ node-version : ${{ matrix.node-version }}
47+ - uses : actions/setup-java@v1
48+ with :
49+ java-version : ' 12.0.2'
50+ architecture : x64
51+ - name : Build & test extension
52+ run : |
2453 npm ci
2554 npm run lint
2655 npm test
56+ shell : pwsh
Original file line number Diff line number Diff line change 2020 "request" : " launch" ,
2121 "runtimeExecutable" : " ${execPath}" ,
2222 "args" : [
23+ " --disable-extensions" ,
2324 " --extensionDevelopmentPath=${workspaceFolder}" ,
2425 " --extensionTestsPath=${workspaceFolder}/out/test/suite/index" ,
25- " . /test-fixtures/with- gradle/ "
26+ " ${workspaceFolder} /test-fixtures/gradle"
2627 ],
2728 "outFiles" : [" ${workspaceFolder}/out/test/**/*.js" ],
2829 "preLaunchTask" : " npm: watch"
Original file line number Diff line number Diff line change @@ -8,3 +8,5 @@ vsc-extension-quickstart.md
88** /tslint.json
99** /* .map
1010** /* .ts
11+ test-fixtures /**
12+ images /**
Original file line number Diff line number Diff line change @@ -4,10 +4,9 @@ import { runTests } from 'vscode-test';
44
55async function main ( ) {
66 try {
7- const testWorkspace = path . resolve (
8- __dirname ,
9- '../../../test-fixtures/with-gradle'
10- ) ;
7+ const testWorkspaces = [
8+ path . resolve ( __dirname , '../../test-fixtures/gradle' )
9+ ] ;
1110
1211 // The folder containing the Extension Manifest package.json
1312 // Passed to `--extensionDevelopmentPath`
@@ -17,11 +16,15 @@ async function main() {
1716 // Passed to --extensionTestsPath
1817 const extensionTestsPath = path . resolve ( __dirname , './suite/index' ) ;
1918
20- // Download VS Code, unzip it and run the integration test
21- await runTests ( {
22- extensionDevelopmentPath,
23- extensionTestsPath,
24- launchArgs : [ testWorkspace ]
19+ testWorkspaces . forEach ( async testWorkspace => {
20+ const launchArgs = [ testWorkspace , '--disable-extensions' ] ;
21+
22+ // Download VS Code, unzip it and run the integration test
23+ await runTests ( {
24+ extensionDevelopmentPath,
25+ extensionTestsPath,
26+ launchArgs
27+ } ) ;
2528 } ) ;
2629 } catch ( err ) {
2730 console . error ( 'Failed to run tests' ) ;
Original file line number Diff line number Diff line change @@ -8,7 +8,11 @@ import * as vscode from 'vscode';
88suite ( 'Extension Test Suite' , ( ) => {
99 vscode . window . showInformationMessage ( 'Start all tests.' ) ;
1010
11- test . skip ( 'Should activate extension @integration' , async ( ) => {
11+ test ( 'Extension should be present' , ( ) => {
12+ assert . ok ( vscode . extensions . getExtension ( 'richardwillis.vscode-gradle' ) ) ;
13+ } ) ;
14+
15+ test ( 'Should activate extension @integration' , async ( ) => {
1216 const extension = vscode . extensions . getExtension (
1317 'richardwillis.vscode-gradle'
1418 ) ;
Original file line number Diff line number Diff line change 1+ <?xml version =" 1.0" encoding =" UTF-8" ?>
2+ <classpath >
3+ <classpathentry kind =" con" path =" org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-12/" />
4+ <classpathentry kind =" con" path =" org.eclipse.buildship.core.gradleclasspathcontainer" />
5+ <classpathentry kind =" output" path =" bin/default" />
6+ </classpath >
Original file line number Diff line number Diff line change 1+ # Ignore Gradle project-specific cache directory
2+ .gradle
3+
4+ # Ignore Gradle build output directory
5+ build
Original file line number Diff line number Diff line change 1+ <?xml version =" 1.0" encoding =" UTF-8" ?>
2+ <projectDescription >
3+ <name >gradle</name >
4+ <comment >Project gradle created by Buildship.</comment >
5+ <projects >
6+ </projects >
7+ <buildSpec >
8+ <buildCommand >
9+ <name >org.eclipse.jdt.core.javabuilder</name >
10+ <arguments >
11+ </arguments >
12+ </buildCommand >
13+ <buildCommand >
14+ <name >org.eclipse.buildship.core.gradleprojectbuilder</name >
15+ <arguments >
16+ </arguments >
17+ </buildCommand >
18+ </buildSpec >
19+ <natures >
20+ <nature >org.eclipse.jdt.core.javanature</nature >
21+ <nature >org.eclipse.buildship.core.gradleprojectnature</nature >
22+ </natures >
23+ </projectDescription >
Original file line number Diff line number Diff line change 1+ connection.project.dir =
2+ eclipse.preferences.version =1
Original file line number Diff line number Diff line change 1+ /*
2+ * This file was generated by the Gradle 'init' task.
3+ *
4+ * This is a general purpose Gradle build.
5+ * Learn how to create Gradle builds at https://guides.gradle.org/creating-new-gradle-builds
6+ */
7+
8+ apply plugin : " java"
You can’t perform that action at this time.
0 commit comments