-
Notifications
You must be signed in to change notification settings - Fork 1
69 lines (59 loc) · 1.84 KB
/
tests.yml
File metadata and controls
69 lines (59 loc) · 1.84 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: CI / Build & Test
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
test:
runs-on: ubuntu-latest # Or windows-latest, macos-latest
strategy:
fail-fast: false # Don't cancel other jobs if one fails
matrix:
vscode_version:
- 1.92.0
- 1.93.0
- 1.94.0
- 1.95.0
- 1.96.0
- 1.97.0
- 1.98.0
- 1.99.0
- 1.100.0
- 1.101.0
- 1.102.0
- 1.103.0
- 1.104.0
- 1.105.0
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: "20" # Or your project's Node.js version
- name: Install dependencies
run: npm ci
# Step to install xvfb
- name: Install xvfb
run: sudo apt-get update && sudo apt-get install -y xvfb
- name: Compile Extension
run: npm run pretest
# Define your test workspace folder relative to the repository root
# You can have multiple test workspaces and dynamically select them if needed
- name: Set test workspace folder
id: test_workspace
run: echo "WORKSPACE_PATH=." >> $GITHUB_OUTPUT # Adjust this path to your actual test workspace folder
- name: Run VS Code Extension Tests
run: |
xvfb-run -a \
./node_modules/.bin/vscode-test \
--vscode-version ${{ matrix.vscode_version }} \
--extensionDevelopmentPath ./ \
--extensionTestsPath dist/test/extension.test.js \
--launch-args "${{ steps.test_workspace.outputs.WORKSPACE_PATH }}" \
--launch-args "--disable-extensions" \
--launch-args "--skip-getting-started"
env:
CI: true # Indicate that we are in a CI environment