Why: nothing runs on branches or PRs today. A broken build or a VSIX missing the server JAR is only found when a release tag is pushed. Running on every push gives feedback while a branch is in progress, before a PR is even opened.
What: add .github/workflows/test.yml:
- Triggers:
push on all branches (branches: ['**']) and pull_request.
- Avoid running twice for the same commit: run
pull_request jobs only for PRs from forks (if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository). Branches in this repo are already covered by push.
concurrency: { group: test-${{ github.ref }}, cancel-in-progress: true }, so a new push cancels the older run on the same branch.
It runs:
npm ci
- lint and a
tsc --noEmit type-check
- a server build (
mvn -B package)
vsce package, then a check that the VSIX contains server/language-server-liquidjava.jar and media/webview.js
Later issues add their tests to this workflow. Everything in this workflow runs on every branch; only the slower wider checks (#132 and #134) are limited to PRs, main or a schedule.
References:
Why: nothing runs on branches or PRs today. A broken build or a VSIX missing the server JAR is only found when a release tag is pushed. Running on every push gives feedback while a branch is in progress, before a PR is even opened.
What: add
.github/workflows/test.yml:pushon all branches (branches: ['**']) andpull_request.pull_requestjobs only for PRs from forks (if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository). Branches in this repo are already covered bypush.concurrency: { group: test-${{ github.ref }}, cancel-in-progress: true }, so a new push cancels the older run on the same branch.It runs:
npm citsc --noEmittype-checkmvn -B package)vsce package, then a check that the VSIX containsserver/language-server-liquidjava.jarandmedia/webview.jsLater issues add their tests to this workflow. Everything in this workflow runs on every branch; only the slower wider checks (#132 and #134) are limited to PRs,
mainor a schedule.References:
vsce package, lint and tests on every push and PR: https://github.com/redhat-developer/vscode-java/blob/main/.github/workflows/pr-verify.yml (on: [push, pull_request], so every branch push is checked)concurrency: https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/control-the-concurrency-of-workflows-and-jobs