-
Notifications
You must be signed in to change notification settings - Fork 13
101 lines (82 loc) · 2.4 KB
/
Copy pathtest.yml
File metadata and controls
101 lines (82 loc) · 2.4 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
name: Test
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
permissions:
contents: read
jobs:
unit:
name: Unit Tests
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22
- name: Enable pnpm
run: |
corepack enable
corepack prepare pnpm@10.25.0 --activate
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Build shared package
run: pnpm --filter @webcode/shared run build
- name: Run unit tests
run: pnpm test
extension-host:
name: Extension Host (${{ matrix.vscode }})
runs-on: ubuntu-latest
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
vscode:
- "1.106.1"
- stable
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Resolve VS Code version
id: vscode-version
shell: bash
env:
REQUESTED_VERSION: ${{ matrix.vscode }}
run: |
if [ "$REQUESTED_VERSION" = "stable" ]; then
RESOLVED_VERSION="$(
curl --fail --silent --show-error \
'https://update.code.visualstudio.com/api/releases/stable?released=true' |
jq -er '.[0]'
)"
else
RESOLVED_VERSION="$REQUESTED_VERSION"
fi
echo "version=$RESOLVED_VERSION" >> "$GITHUB_OUTPUT"
- name: Cache VS Code test runtime
uses: actions/cache@v4
with:
path: gateway-vscode/.vscode-test/vscode-*
key: vscode-test-v1-${{ runner.os }}-${{ runner.arch }}-${{ steps.vscode-version.outputs.version }}
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22
- name: Enable pnpm
run: |
corepack enable
corepack prepare pnpm@10.25.0 --activate
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Build shared package
run: pnpm --filter @webcode/shared run build
- name: Run Extension Host tests
env:
WEBCODE_EVAL_VSCODE_PATH: download
VSCODE_TEST_VERSION: ${{ steps.vscode-version.outputs.version }}
run: xvfb-run -a pnpm test:extension