Repository navigation
128 lines (103 loc) · 2.96 KB
/
Copy pathtest.yml
File metadata and controls
128 lines (103 loc) · 2.96 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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
name: Test
on:
push:
branches: [main]
pull_request:
workflow_call:
concurrency:
group: test-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
checks:
name: Checks
runs-on: ubuntu-latest
defaults:
run:
working-directory: client
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Java
uses: actions/setup-java@v4
with:
java-version: 21
distribution: temurin
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
cache-dependency-path: client/package-lock.json
- name: Install dependencies
run: npm ci
- name: Lint
run: npm run lint
- name: Type-check
run: npx tsc --noEmit
- name: Unit tests
run: npm run test:unit
- name: Type-check tests
run: npm run test:typecheck
- name: Build and test server
working-directory: server
run: |
mvn -B package
mkdir -p ../client/server
cp target/language-server-liquidjava.jar ../client/server/
- name: Package extension
run: npx vsce package --out liquid-java.vsix
- name: Check packaged runtime files
run: |
unzip -Z1 liquid-java.vsix > /tmp/liquid-java-vsix-files.txt
grep -Fx 'extension/dist/server/language-server-liquidjava.jar' /tmp/liquid-java-vsix-files.txt
grep -Fx 'extension/media/webview.js' /tmp/liquid-java-vsix-files.txt
- name: Upload checked extension
uses: actions/upload-artifact@v4
with:
name: liquid-java-vsix
path: client/liquid-java.vsix
if-no-files-found: error
retention-days: 1
integration:
name: VS Code integration (${{ matrix.version }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
version: [stable, minimum]
defaults:
run:
working-directory: client
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Java
id: java
uses: actions/setup-java@v4
with:
java-version: 21
distribution: temurin
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
cache-dependency-path: client/package-lock.json
- name: Install dependencies
run: npm ci
- name: Build server
run: npm run build:server
- name: Run VS Code fixture tests
env:
JAVA_HOME: ${{ steps.java.outputs.path }}
VSCODE_TEST_VERSION: ${{ matrix.version }}
run: xvfb-run -a npm test
- name: Upload VS Code logs
if: failure()
uses: actions/upload-artifact@v4
with:
name: vscode-logs-${{ matrix.version }}
path: client/.vscode-test/user-data/logs
if-no-files-found: ignore