From 21efc797a3b0d63ee393e76292c5c661d8d55159 Mon Sep 17 00:00:00 2001 From: Anthony LC Date: Mon, 28 Sep 2026 22:30:27 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=B7(ci)=20lint,=20type-check=20and=20t?= =?UTF-8?q?est=20yhub-server=20and=20the=20loadtest=20packages?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit yhub-server, src/loadtest/swarm and src/loadtest/canary are standalone TypeScript packages, each with its own package.json and yarn.lock, outside the src/frontend workspaces. The frontend workflow never saw them, and the backend job only built yhub-server to serve its integration tests, so their lint, type check and unit tests never ran in the CI. A matrix job now runs `yarn lint`, `yarn typecheck` and `yarn test` for each of them, and installs Chromium for the canary, whose tests drive a real browser. --- .github/workflows/impress.yml | 38 +++++++++++++++++++++++++++++++++++ CHANGELOG.md | 1 + 2 files changed, 39 insertions(+) diff --git a/.github/workflows/impress.yml b/.github/workflows/impress.yml index 6dec4482e..8de91c528 100644 --- a/.github/workflows/impress.yml +++ b/.github/workflows/impress.yml @@ -108,6 +108,44 @@ jobs: - name: Lint code with pylint run: uv run pylint impress demo core + # The standalone TypeScript packages: each has its own package.json and + # yarn.lock, outside the src/frontend workspaces, so the frontend workflow + # never lints nor tests them. + lint-test-node-packages: + name: lint-test-node-packages (${{ matrix.package }}) + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + package: + - src/yhub-server + - src/loadtest/swarm + - src/loadtest/canary + defaults: + run: + working-directory: ${{ matrix.package }} + steps: + - name: Checkout repository + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 + - name: Set up Node + uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6 + with: + node-version: "22.x" + cache: yarn + cache-dependency-path: ${{ matrix.package }}/yarn.lock + - name: Install dependencies + run: yarn install --frozen-lockfile + # the canary tests drive a real Chromium + - name: Install Chromium + if: matrix.package == 'src/loadtest/canary' + run: npx playwright install --with-deps chromium + - name: Lint + run: yarn lint + - name: Check types + run: yarn typecheck + - name: Run tests + run: yarn test + test-back: runs-on: ubuntu-latest needs: install-dependencies diff --git a/CHANGELOG.md b/CHANGELOG.md index cb5f0a818..fd7566e28 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -64,6 +64,7 @@ and this project adheres to `COLLABORATION_VERSION_GRANULARITY_MS` - ✨(frontend) keep a local copy of documents, so they open and stay editable offline +- 👷(ci) lint, type-check and test yhub-server and the loadtest packages - 🐛(frontend) stop the service worker from caching the collaboration server's rest api