Skip to content

Commit 4b68b7e

Browse files
committed
Fix web support, add smoke tests
1. Fix schema content resolving when running on web (referencing a schema with a relative path wasn't working) 2. Add smoke tests for desktop using `@vscode/test-cli` 3. Add smoke tests for web using `@vscode/test-web` The smoke tests are very minimal; it loads a YAML file that references a schema using a relative path and verifies the expected diagnostics appear. Signed-off-by: David Thompson <davthomp@redhat.com>
1 parent d9db419 commit 4b68b7e

File tree

11 files changed

+1179
-705
lines changed

11 files changed

+1179
-705
lines changed

.github/workflows/CI.yaml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,3 +79,37 @@ jobs:
7979
path: |
8080
test-resources/screenshots/*.png
8181
retention-days: 2
82+
83+
Smoke-Test-Web:
84+
runs-on: 'ubuntu-latest'
85+
steps:
86+
- uses: actions/checkout@v4
87+
- name: Use Node 20
88+
uses: actions/setup-node@v4
89+
with:
90+
node-version: 20
91+
- name: Install dependencies
92+
run: npm ci
93+
- name: Update yaml-language-server
94+
run: npm i yaml-language-server@next
95+
- name: Build extension
96+
run: npm run build
97+
- name: Run tests on web
98+
run: xvfb-run npm run smoke-test-web
99+
100+
Smoke-Test-Desktop:
101+
runs-on: 'ubuntu-latest'
102+
steps:
103+
- uses: actions/checkout@v4
104+
- name: Use Node 20
105+
uses: actions/setup-node@v4
106+
with:
107+
node-version: 20
108+
- name: Install dependencies
109+
run: npm ci
110+
- name: Update yaml-language-server
111+
run: npm i yaml-language-server@next
112+
- name: Build extension
113+
run: npm run build
114+
- name: Run tests on web
115+
run: xvfb-run npm run smoke-test

.vscode-test.mjs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import { defineConfig } from '@vscode/test-cli';
2+
3+
export default defineConfig({
4+
files: 'out/smoke-test/**/*.test.js',
5+
workspaceFolder: './smoke-test/',
6+
});

0 commit comments

Comments
 (0)