Skip to content

Commit 1f31de2

Browse files
committed
Added prerelease deploy on develop branch
1 parent 7620b8c commit 1f31de2

File tree

4 files changed

+47
-23
lines changed

4 files changed

+47
-23
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
on:
2+
push:
3+
branches:
4+
- develop
5+
name: Push Extension Prerelease
6+
jobs:
7+
deploy:
8+
runs-on: ubuntu-latest
9+
permissions:
10+
contents: read
11+
id-token: write
12+
steps:
13+
- uses: actions/checkout@v4
14+
- name: Use Node.js '20.x'
15+
uses: actions/setup-node@v4
16+
with:
17+
node-version: "20.x"
18+
cache: "npm"
19+
- run: npm ci
20+
- run: npm --prefix server ci
21+
- run: npm --prefix client ci
22+
- uses: lannonbr/vsce-action@4.0.0
23+
with:
24+
args: "publish --pre-release -p $VSCE_TOKEN"
25+
env:
26+
VSCE_TOKEN: ${{ secrets.VSCE_TOKEN }}

src/test/standard-workspace.test.ts

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,10 @@ suite("Standard Workspace Test Suite", () => {
140140
{ type: 'quickpick', value: 'minimal', description: 'Select minimal manifest' },
141141
{ type: 'quickpick', value: 'stm32', description: 'Select STM32 toolchain' },
142142
{ type: 'quickpick', value: 'v4.2.0', description: 'Select default configuration' },
143-
{ type: 'input', value: '', description: 'Select additional west init args' }
143+
{ type: 'input', value: '', description: 'Select additional west init args' },
144+
{ type: 'quickpick', value: 'automatic', description: 'Select SDK Version' },
145+
{ type: 'quickpick', value: 'select specific', description: 'Select specific toolchains' },
146+
{ type: 'quickpick', value: 'arm-zephyr-eabi', description: 'Select ARM toolchain', multiSelect: true }
144147
]);
145148

146149
result = await vscode.commands.executeCommand(
@@ -152,14 +155,9 @@ suite("Standard Workspace Test Suite", () => {
152155

153156
console.log("⚙️ Step 3: Installing SDK...");
154157
// Prime the mock interface for SDK installation interactions
155-
uiMock.primeInteractions([
156-
{ type: 'quickpick', value: 'automatic', description: 'Select SDK Version' },
157-
{ type: 'quickpick', value: 'select specific', description: 'Select specific toolchains' },
158-
{ type: 'quickpick', value: 'arm-zephyr-eabi', description: 'Select ARM toolchain', multiSelect: true }
159-
]);
160158

161-
result = await vscode.commands.executeCommand("zephyr-ide.install-sdk");
162-
assert.ok(result, "SDK installation should succeed");
159+
//result = await vscode.commands.executeCommand("zephyr-ide.install-sdk");
160+
//assert.ok(result, "SDK installation should succeed");
163161

164162
console.log("📁 Step 4: Creating project from template...");
165163
// Prime the mock interface for project creation interactions

src/test/west-git-workspace.test.ts

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -121,31 +121,29 @@ suite("West Git Workspace Test Suite", () => {
121121
// Prime the mock interface for git workspace setup interactions
122122
gitUiMock.primeInteractions([
123123
{ type: 'input', value: 'https://github.com/mylonics/zephyr-ide-samples.git', description: 'Enter git repo URL' },
124-
{ type: 'input', value: '-mr west_repo', description: 'Enter Additionaladditional arguments for west' }
124+
{ type: 'input', value: '--mr west_repo', description: 'Enter Additionaladditional arguments for west' },
125125
]);
126126

127127
let result = await vscode.commands.executeCommand(
128128
"zephyr-ide.workspace-setup-from-west-git"
129129
);
130130
assert.ok(result, "Git workspace setup should succeed");
131131

132-
await monitorWorkspaceSetup("git workspace");
133-
134-
console.log("⚙️ Step 2: Installing SDK...");
135-
// Prime the mock interface for SDK installation interactions
136132
gitUiMock.primeInteractions([
137133
{ type: 'quickpick', value: 'automatic', description: 'Select SDK Version' },
138134
{ type: 'quickpick', value: 'select specific', description: 'Select specific toolchains' },
139135
{ type: 'quickpick', value: 'arm-zephyr-eabi', description: 'Select ARM toolchain', multiSelect: true }
140136
]);
141137

142-
result = await vscode.commands.executeCommand("zephyr-ide.install-sdk");
143-
assert.ok(result, "SDK installation should succeed");
138+
await monitorWorkspaceSetup("git workspace");
139+
140+
console.log("⚙️ Step 2: Installing SDK...");
141+
// Prime the mock interface for SDK installation interactions
144142

145143
console.log("📁 Step 3: Adding project from example repo...");
146144
// Prime the mock interface for project addition interactions
147145
gitUiMock.primeInteractions([
148-
{ type: 'opendialog', value: path.join(testWorkspaceDir, "zephyr-example.git", "app"), description: 'Select app folder' }
146+
{ type: 'opendialog', value: path.join(testWorkspaceDir, "zephyr-ide-samples", "app"), description: 'Select app folder' }
149147
]);
150148

151149
result = await vscode.commands.executeCommand("zephyr-ide.add-project");

src/test/zephyr-ide-git-workspace.test.ts

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -121,26 +121,28 @@ suite("Zephyr IDE Git Workspace Test Suite", () => {
121121
console.log("🏗️ Step 1: Setting up workspace from Zephyr IDE Git...");
122122
// Prime the mock interface for Zephyr IDE git workspace setup
123123
gitUiMock.primeInteractions([
124-
{ type: 'input', value: '--branch main -- https://github.com/mylonics/zephyr-ide-samples.git', description: 'Enter Zephyr IDE git repo URL' }
124+
{ type: 'input', value: '--branch main -- https://github.com/mylonics/zephyr-ide-samples.git', description: 'Enter Zephyr IDE git repo URL' },
125125
]);
126126

127127
let result = await vscode.commands.executeCommand(
128128
"zephyr-ide.workspace-setup-from-git"
129129
);
130130
assert.ok(result, "Zephyr IDE git workspace setup should succeed");
131131

132-
await monitorWorkspaceSetup("Zephyr IDE git workspace");
133-
134-
console.log("⚙️ Step 2: Installing SDK...");
135-
// Prime the mock interface for SDK installation interactions
136132
gitUiMock.primeInteractions([
137133
{ type: 'quickpick', value: 'automatic', description: 'Select SDK Version' },
138134
{ type: 'quickpick', value: 'select specific', description: 'Select specific toolchains' },
139135
{ type: 'quickpick', value: 'arm-zephyr-eabi', description: 'Select ARM toolchain', multiSelect: true }
140136
]);
141137

142-
result = await vscode.commands.executeCommand("zephyr-ide.install-sdk");
143-
assert.ok(result, "SDK installation should succeed");
138+
139+
await monitorWorkspaceSetup("Zephyr IDE git workspace");
140+
141+
console.log("⚙️ Step 2: Installing SDK...");
142+
// Prime the mock interface for SDK installation interactions
143+
144+
//result = await vscode.commands.executeCommand("zephyr-ide.install-sdk");
145+
//assert.ok(result, "SDK installation should succeed");
144146

145147
console.log("⚡ Step 3: Executing build...");
146148
// Wait a moment for workspace setup to complete

0 commit comments

Comments
 (0)