From d6f2f0854862de372373c00d151a7350efa9c19a Mon Sep 17 00:00:00 2001 From: Felix Delval Date: Mon, 21 Sep 2026 14:46:25 +0200 Subject: [PATCH 1/3] Run lint and unit tests on pull requests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- .github/workflows/unit-tests.yml | 35 ++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/unit-tests.yml diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml new file mode 100644 index 0000000..154df67 --- /dev/null +++ b/.github/workflows/unit-tests.yml @@ -0,0 +1,35 @@ +name: Unit Tests + +on: + push: + branches: [ main, develop ] + paths: + - 'packages/**' + pull_request: + branches: [ main, develop ] + paths: + - 'packages/**' + +jobs: + test: + name: Lint and Run Unit Tests + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Set up Node.js + uses: actions/setup-node@v3 + with: + node-version: '20.19.5' + cache: 'npm' + + - name: Install dependencies + run: npm ci + + - name: Run lint + run: npm run lint + + - name: Run unit tests + run: npm run test:unit From caa705fe0966e0b6b17b96fd95fd30cc6014bbc8 Mon Sep 17 00:00:00 2001 From: Felix Delval Date: Mon, 21 Sep 2026 14:48:56 +0200 Subject: [PATCH 2/3] Trigger on changes to the workflow file itself 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 --- .github/workflows/unit-tests.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index 154df67..d9c98c5 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -5,10 +5,12 @@ on: branches: [ main, develop ] paths: - 'packages/**' + - '.github/workflows/unit-tests.yml' pull_request: branches: [ main, develop ] paths: - 'packages/**' + - '.github/workflows/unit-tests.yml' jobs: test: From 4d539dbe07e057ceb54399274f48d683b21f1fa9 Mon Sep 17 00:00:00 2001 From: Felix Delval Date: Mon, 21 Sep 2026 14:52:35 +0200 Subject: [PATCH 3/3] Build packages before running unit tests 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 --- .github/workflows/unit-tests.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index d9c98c5..c82354c 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -33,5 +33,8 @@ jobs: - name: Run lint run: npm run lint + - name: Build packages + run: npm run build + - name: Run unit tests run: npm run test:unit