Skip to content

Commit 0a45c36

Browse files
author
Hudson Xing
committed
Add unit test and e2e test placeholders to build workflow
1 parent e2526cb commit 0a45c36

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

.github/workflows/build.yml

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ concurrency:
1818

1919
jobs:
2020
# Run unit tests before building the application
21+
2122
run-unit-tests:
2223
name: Run unit tests
2324
runs-on: ubuntu-latest
@@ -26,9 +27,19 @@ jobs:
2627
- name: Checkout code
2728
uses: actions/checkout@v4
2829

29-
# Output placeholder message for unit tests
30-
- name: Hudson's test of unit test
31-
run: echo "Hudson's test of unit test"
30+
# Verify CSP line exists in target TypeScript file
31+
- name: Check CSP configuration in webClientServer.ts
32+
run: |
33+
TARGET_FILE="sagemaker-code-editor/patched-vscode/src/vs/server/node/webClientServer.ts"
34+
REQUIRED_LINE="connect-src 'self' ws: wss: https://main.vscode-cdn.net http://localhost:* https://localhost:* https://login.microsoftonline.com/ https://update.code.visualstudio.com https://.vscode-unpkg.net/ https://default.exp-tas.com/vscode/ab https://vscode-sync.trafficmanager.net https://vscode-sync-insiders.trafficmanager.net https://.gallerycdn.vsassets.io https://marketplace.visualstudio.com https://.blob.core.windows.net https://az764295.vo.msecnd.net https://code.visualstudio.com https://.gallery.vsassets.io https://.rel.tunnels.api.visualstudio.com wss://.rel.tunnels.api.visualstudio.com https://.servicebus.windows.net/ https://vscode.blob.core.windows.net https://vscode.search.windows.net https://vsmarketplacebadges.dev https://vscode.download.prss.microsoft.com https://download.visualstudio.microsoft.com https://.vscode-unpkg.net https://open-vsx.org;"
35+
36+
if grep -F "$REQUIRED_LINE" "$TARGET_FILE" > /dev/null; then
37+
echo "✅ PASS: Required CSP line exists."
38+
else
39+
echo "❌ FAIL: Required CSP line NOT found in $TARGET_FILE"
40+
exit 1
41+
fi
42+
3243
3344
3445
# The main job for building the application

0 commit comments

Comments
 (0)