Skip to content

Commit e4df952

Browse files
committed
ci: check branches and validate extension packaging
1 parent 1554a52 commit e4df952

1 file changed

Lines changed: 66 additions & 0 deletions

File tree

‎.github/workflows/test.yml‎

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: Test
2+
3+
on:
4+
push:
5+
branches: ['**']
6+
pull_request:
7+
workflow_call:
8+
9+
concurrency:
10+
group: test-${{ github.ref }}
11+
cancel-in-progress: true
12+
13+
permissions:
14+
contents: read
15+
16+
jobs:
17+
checks:
18+
name: Checks
19+
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
20+
runs-on: ubuntu-latest
21+
22+
defaults:
23+
run:
24+
working-directory: client
25+
26+
steps:
27+
- name: Checkout
28+
uses: actions/checkout@v4
29+
30+
- name: Setup Java
31+
uses: actions/setup-java@v4
32+
with:
33+
java-version: 21
34+
distribution: temurin
35+
36+
- name: Setup Node.js
37+
uses: actions/setup-node@v4
38+
with:
39+
node-version: 22
40+
cache: npm
41+
cache-dependency-path: client/package-lock.json
42+
43+
- name: Install dependencies
44+
run: npm ci
45+
46+
- name: Lint
47+
run: npm run lint
48+
49+
- name: Type-check
50+
run: npx tsc --noEmit
51+
52+
- name: Build server
53+
working-directory: server
54+
run: |
55+
mvn -B package
56+
mkdir -p ../client/server
57+
cp target/language-server-liquidjava.jar ../client/server/
58+
59+
- name: Package extension
60+
run: npx vsce package --out liquid-java.vsix
61+
62+
- name: Check packaged runtime files
63+
run: |
64+
unzip -Z1 liquid-java.vsix > /tmp/liquid-java-vsix-files.txt
65+
grep -Fx 'extension/dist/server/language-server-liquidjava.jar' /tmp/liquid-java-vsix-files.txt
66+
grep -Fx 'extension/media/webview.js' /tmp/liquid-java-vsix-files.txt

0 commit comments

Comments
 (0)