From fd2b5d5599192200b8bd1b93b767f23afae29fba Mon Sep 17 00:00:00 2001 From: Manuel Raynaud Date: Wed, 30 Sep 2026 14:00:28 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=B7(ci)=20lint,=20typecheck,=20build?= =?UTF-8?q?=20and=20test=20the=20collaboration=20server?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The CI was not setup for yhub, we added the missing jobs: lint, test and typecheck --- .github/workflows/yhub.yml | 69 ++++++++++++++++++++++++++++++++++++++ CHANGELOG.md | 1 + 2 files changed, 70 insertions(+) create mode 100644 .github/workflows/yhub.yml diff --git a/.github/workflows/yhub.yml b/.github/workflows/yhub.yml new file mode 100644 index 000000000..5be422a5c --- /dev/null +++ b/.github/workflows/yhub.yml @@ -0,0 +1,69 @@ +name: Collaboration Server Workflow + +on: + push: + branches: + - main + pull_request: + branches: + - "*" + +permissions: + contents: read + +# src/yhub-server is a standalone package (its own package.json and yarn.lock), +# not a workspace of src/frontend: it gets its own install. Its image is built +# by docker-hub.yml, and the backend integration tests in impress.yml run +# against a live instance of it. This workflow runs the package's own checks. +defaults: + run: + working-directory: src/yhub-server + +jobs: + lint-yhub: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 + + - name: Setup Node.js + uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6 + with: + node-version: "22.x" + cache: yarn + cache-dependency-path: src/yhub-server/yarn.lock + + - name: Install dependencies + run: yarn install --frozen-lockfile + + - name: Lint + run: yarn lint + + - name: Typecheck + run: yarn typecheck + + # the image compiles with tsconfig.build.json (rootDir ./src, emits), + # which can fail where the typecheck passes: build too so a break shows + # up here rather than in the image build + - name: Build + run: yarn build + + test-yhub: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 + + - name: Setup Node.js + uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6 + with: + node-version: "22.x" + cache: yarn + cache-dependency-path: src/yhub-server/yarn.lock + + - name: Install dependencies + run: yarn install --frozen-lockfile + + # unit suite: @y/hub is mocked, no redis, postgres or S3 needed + - name: Test + run: yarn test diff --git a/CHANGELOG.md b/CHANGELOG.md index 8e03dd04d..3174bcb82 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ and this project adheres to ### Added +- 👷(ci) lint, typecheck, build and test the collaboration server (yhub) - ✨(backend) add mention endpoint with cooldown-limited email notification #2447 - 🚩(setting) add feature flag on Duplicate with Children #2721