diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml
index 225cb0d..f499530 100644
--- a/.github/workflows/publish.yml
+++ b/.github/workflows/publish.yml
@@ -16,7 +16,7 @@ jobs:
- name: Setup Java
uses: actions/setup-java@v4
with:
- java-version: 20
+ java-version: 21
distribution: temurin
- name: Setup Node.js
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
new file mode 100644
index 0000000..c63c6f7
--- /dev/null
+++ b/.github/workflows/test.yml
@@ -0,0 +1,65 @@
+name: Test
+
+on:
+ push:
+ branches: ['**']
+ 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: Build 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
diff --git a/server/pom.xml b/server/pom.xml
index 71d1296..31b050c 100644
--- a/server/pom.xml
+++ b/server/pom.xml
@@ -36,10 +36,6 @@
org.apache.maven.plugins
maven-compiler-plugin
${pVersion.compiler}
-
- 20
- 20
-
org.apache.maven.plugins
@@ -102,8 +98,7 @@
0.24.0
UTF-8
- 20
- 20
+ 20
1.3.0
10.4.2