Skip to content

ci: run lint and unit tests on pull requests - #154

Merged
fe-lix- merged 3 commits into
mainfrom
ci/run-unit-tests-on-pr
Sep 21, 2026
Merged

fe-lix- merged 3 commits into
mainfrom
ci/run-unit-tests-on-pr

Conversation

@fe-lix-

@fe-lix- fe-lix- commented Sep 21, 2026

Copy link
Copy Markdown
Contributor

Description

Adds a pull_request-triggered workflow that runs npm run lint and npm run test:unit (the root Jest suite across uix-core/uix-host/uix-host-react).

Motivation and Context

Found while reviewing #152: none of the pull_request/push-triggered workflows in this repo actually run the root Jest suite.

  • e2e-local-dist.yml runs on pull_request, but its test step (npm test in working-directory: e2e/tests) runs the TestCafe e2e suite, not the root Jest config.
  • npm-publish-manual.yml and npm-prerelease-nightly.yml reference npm run test (lint + test:unit + subtests), but only fire on workflow_dispatch/schedule — never on a PR.
  • e2e-all-versions.yml is workflow_dispatch-only.

Practical effect: unit test files (e.g. Extensible.test.tsx) can be broken, weakened, or deleted by a PR with zero automated signal catching it before merge — the only thing gating a PR today is the e2e suite and whatever the author happens to run locally.

How Has This Been Tested?

Ran the exact commands the new job runs, against current main:

  • npm run lint — passes (prettier format check + fixpack, no eslint step — matches the existing lint script, unchanged here).
  • npm run test:unit — 15 suites, 84 passed / 2 skipped, 0 failing.

Types of changes

  • New feature (non-breaking change which adds functionality) — CI-only, doesn't touch package code.

Checklist

  • I have read the CONTRIBUTING document.
  • All new and existing tests passed.

🤖 Generated with Claude Code

fe-lix- and others added 3 commits September 21, 2026 14:46
None of the pull_request-triggered workflows actually run the root
Jest suite (npm run test:unit) — only the TestCafe e2e suite in
e2e-local-dist.yml runs on PRs. npm-publish-manual.yml and
npm-prerelease-nightly.yml reference npm run test, but only fire on
workflow_dispatch/schedule, never on a PR.

Practical effect: unit test files (e.g. Extensible.test.tsx) can be
broken or deleted by a PR with no automated signal catching it before
merge. Add a workflow that runs npm run lint + npm run test:unit on
every PR touching packages/**.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The path filter only matched packages/**, so this workflow never ran
on the PR that introduced it (#154) -- confirmed via gh pr checks,
only CLA and Kodiak fired. Add the workflow's own path so future
edits to it (including this one) are validated.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Jest/ts-jest resolves the workspace packages (@adobe/uix-host,
@adobe/uix-core, etc.) through their built dist/ output, not their
TS source. Without a build step first, every test file that imports
across packages fails with TS2307 "Cannot find module" on a clean
checkout.

Reproduced in a scratch clone with only `npm ci`: 6 of 15 suites
failed this way. Confirmed `npm run build` before `npm run test:unit`
fixes it -- 15/15 passing from a clean checkout.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@fe-lix-
fe-lix- merged commit bfb2041 into main Sep 21, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant