File tree Expand file tree Collapse file tree 3 files changed +34
-11
lines changed
Expand file tree Collapse file tree 3 files changed +34
-11
lines changed Original file line number Diff line number Diff line change @@ -49,8 +49,7 @@ public sealed partial class Solution : NukeBuild,
4949 . DependsOn ( Restore )
5050 . DependsOn ( Build )
5151 . DependsOn ( Test )
52- . DependsOn ( Pack )
53- . DependsOn ( TestVscodeTestExtension ) ;
52+ . DependsOn ( Pack ) ;
5453
5554 public Target Build => _ => _ . Inherit < ICanBuildWithDotNetCore > ( x => x . CoreBuild ) ;
5655
@@ -69,7 +68,7 @@ public sealed partial class Solution : NukeBuild,
6968 NpmTasks . NpmCi ( s => s
7069 . SetProcessWorkingDirectory ( VscodeTestExtensionProjectDirectory ) ) ) ;
7170
72- public Target TestVscodeTestExtension => _ => _
71+ public Target TestVscodeExtension => _ => _
7372 . DependsOn ( NpmInstall )
7473 . Executes ( ( ) =>
7574 NpmTasks . NpmRun ( s => s
Original file line number Diff line number Diff line change @@ -102,10 +102,32 @@ RocketSurgeonGitHubActionsConfiguration configuration
102102 . ConfigureStep < CheckoutStep > ( step => step . FetchDepth = 0 )
103103 . UseDotNetSdks ( "3.1" , "7.0" )
104104 . AddNuGetCache ( )
105+ . AddVscodeExtensionTests ( )
105106 . PublishLogs < Solution > ( )
106107 . PublishArtifacts < Solution > ( )
107108 . FailFast = false ;
108109
109110 return configuration ;
110111 }
111112}
113+
114+ public static class Extensions
115+ {
116+ public static RocketSurgeonsGithubActionsJob AddVscodeExtensionTests ( this RocketSurgeonsGithubActionsJob job )
117+ {
118+ return job
119+ . AddStep ( new RunStep ( "Npm install" ) {
120+ Run = string . Join ( Environment . NewLine , [
121+ "cd vscode-testextension" ,
122+ "npm ci" ,
123+ "cd .."
124+ ] )
125+ } )
126+ . AddStep ( new UsingStep ( "Vscode extension tests" ) {
127+ Uses = "coactions/setup-xvfb@v1" ,
128+ With = {
129+ [ "run" ] = "npm run test" ,
130+ [ "working-directory" ] = "vscode-testextension"
131+ } } ) ;
132+ }
133+ }
Original file line number Diff line number Diff line change @@ -113,18 +113,20 @@ jobs:
113113 id : test
114114 run : |
115115 dotnet nuke Test TriggerCodeCoverageReports GenerateCodeCoverageReportCobertura GenerateCodeCoverageBadges GenerateCodeCoverageSummary GenerateCodeCoverageReport --skip
116- - name : Npm Install
117- id : npmInstall
118- run : |
119- dotnet nuke NpmInstall --skip
120- - name : 🚦 Test Vscode Test Extension
121- id : testVscodeTestExtension
122- run : |
123- dotnet nuke TestVscodeTestExtension --skip
124116 - name : 📦 Pack
125117 id : pack
126118 run : |
127119 dotnet nuke Pack --skip
120+ - name : Npm install
121+ run : |
122+ cd vscode-testextension
123+ npm ci
124+ cd ..
125+ - name : 🚦 Vscode extension tests
126+ uses : coactions/setup-xvfb@v1
127+ with :
128+ run : ' npm run test'
129+ working-directory : ' vscode-testextension'
128130 - name : 🏺 Publish coverage data
129131 if : always()
130132 uses : actions/upload-artifact@v3
You can’t perform that action at this time.
0 commit comments