Skip to content

Commit 4ac40eb

Browse files
authored
Merge pull request #1061 from manandre/nuke-working-directory
Use new WorkingDirectory property for RunStep
2 parents b330ee2 + cd16591 commit 4ac40eb

File tree

3 files changed

+7
-10
lines changed

3 files changed

+7
-10
lines changed

.build/Build.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,5 +83,5 @@ public sealed partial class Solution : NukeBuild,
8383

8484
AbsolutePath ICanUpdateReadme.ReadmeFilePath => RootDirectory / "README.md";
8585

86-
private const string VscodeTestExtensionProjectDirectory = "vscode-testextension";
86+
internal const string VscodeTestExtensionProjectDirectory = "vscode-testextension";
8787
}

.build/Solution.cs

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -117,17 +117,15 @@ public static RocketSurgeonsGithubActionsJob AddVscodeExtensionTests(this Rocket
117117
{
118118
return job
119119
.AddStep(new RunStep("Npm install") {
120-
Run = string.Join(Environment.NewLine, [
121-
"cd vscode-testextension",
122-
"npm ci",
123-
"cd .."
124-
])
120+
Run = "npm ci",
121+
WorkingDirectory = Solution.VscodeTestExtensionProjectDirectory
125122
})
126123
.AddStep(new UsingStep("Vscode extension tests") {
127124
Uses = "coactions/setup-xvfb@v1",
128125
With = {
129126
["run"] = "npm run test",
130-
["working-directory"] = "vscode-testextension"
131-
}});
127+
["working-directory"] = Solution.VscodeTestExtensionProjectDirectory
128+
}
129+
});
132130
}
133131
}

.github/workflows/ci.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,10 +118,9 @@ jobs:
118118
run: |
119119
dotnet nuke Pack --skip
120120
- name: Npm install
121+
working-directory: vscode-testextension
121122
run: |
122-
cd vscode-testextension
123123
npm ci
124-
cd ..
125124
- name: 🚦 Vscode extension tests
126125
uses: coactions/setup-xvfb@v1
127126
with:

0 commit comments

Comments
 (0)