Skip to content

ci(widget): run typecheck, unit tests, and Playwright in GitHub Actions #64

Description

@Asaf-prog

Problem

The widget has its own TypeScript typecheck, unit tests, and Playwright end-to-end tests, but these checks are not currently enforced by GitHub Actions.

The existing CI quality gate runs the Python-focused checks through make check, including linting, mypy, pytest, and generated-file validation. As a result, a PR can receive a green CI status even if the widget fails to compile or its browser tests are broken.

This is especially important for widget behavior involving:

  • conversation switching
  • streaming responses
  • stale-conversation recovery
  • localStorage state
  • per-conversation message and usage state
  • loading and typing indicators

These flows may only fail in TypeScript compilation or browser-level tests.

Proposed change

Extend the GitHub Actions workflow to run the widget checks on every pull request and push to the main branch.

The workflow should run:

  1. Widget TypeScript typecheck
  2. Widget unit tests
  3. Playwright end-to-end tests

The exact commands should use the existing scripts defined by the widget project, for example:

npm run typecheck
npm run test:widget
npx playwright test

The workflow should also install the required Node.js dependencies and Playwright browser dependencies before running the tests.

Acceptance criteria

  • GitHub Actions runs the widget TypeScript typecheck.
  • GitHub Actions runs the widget unit tests.
  • GitHub Actions runs the Playwright end-to-end tests.
  • A failure in any widget check causes the PR CI check to fail.
  • The checks run automatically on pull requests.
  • The CI workflow uses the existing widget package scripts where available.
  • Playwright browser installation is cached or configured efficiently where possible.

Expected result

A PR should not be considered fully green unless both the backend and widget test suites pass:

Python lint and typecheck     ✅
Python tests                  ✅
Widget typecheck              ✅
Widget unit tests             ✅
Playwright E2E tests          ✅

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions