Skip to content

Add a test workflow that runs on every branch #125

Description

@CatarinaGamboa

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:

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    testingTesting related

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions