👷(ci) lint, type-check and test yhub-server and the loadtest packages

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.
This commit is contained in:
Anthony LC
2026-09-28 22:43:54 +02:00
parent 36b9550ce3
commit 21efc797a3
2 changed files with 39 additions and 0 deletions
+38
View File
@@ -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
+1
View File
@@ -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