mirror of
https://github.com/suitenumerique/docs.git
synced 2026-10-01 05:55:16 +02:00
👷(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:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user