From aa402be116142aa6a9fbdd6a39c61ce77cd7c243 Mon Sep 17 00:00:00 2001 From: zk Date: Thu, 21 May 2026 17:53:40 +0100 Subject: [PATCH] feat: check.yml (#1541) --- .github/workflows/bot.yml | 6 --- .github/workflows/check.yml | 49 +++++++++++++++++++++++++ .github/workflows/client.yml | 21 ----------- .github/workflows/common.yml | 5 --- .github/workflows/server.yml | 6 --- typescript/server/vitest.globalSetup.ts | 1 - 6 files changed, 49 insertions(+), 39 deletions(-) create mode 100644 .github/workflows/check.yml diff --git a/.github/workflows/bot.yml b/.github/workflows/bot.yml index 0af83f749..87f949f72 100644 --- a/.github/workflows/bot.yml +++ b/.github/workflows/bot.yml @@ -67,12 +67,6 @@ jobs: - name: Install dependencies run: bun install --frozen-lockfile - - name: Lint code - run: bun run --filter tachi-bot lint - - - name: Typecheck code - run: bun run --filter tachi-bot typecheck - - name: Run tests run: bun run --filter tachi-bot test env: diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml new file mode 100644 index 000000000..d4de72ea3 --- /dev/null +++ b/.github/workflows/check.yml @@ -0,0 +1,49 @@ +name: Check + +on: + push: + branches: + - "main" + paths: + - "typescript/**" + - "biome.json" + - ".prettierrc" + - ".prettierignore" + - ".scripts/ts_machete.js" + - ".scripts/ts_autoinherit.js" + - ".github/workflows/check.yml" + pull_request: + branches: + - "main" + paths: + - "typescript/**" + - "biome.json" + - ".prettierrc" + - ".prettierignore" + - ".scripts/ts_machete.js" + - ".scripts/ts_autoinherit.js" + - ".github/workflows/check.yml" + workflow_dispatch: + +permissions: + contents: read + +jobs: + check: + runs-on: ubuntu-latest + container: + image: ghcr.io/zkldi/tachi-ci:main + options: --user root + steps: + - name: Checkout + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + persist-credentials: false + + - name: Install dependencies + run: bun install --frozen-lockfile + + - name: Check (format, lint, typecheck, machete, autoinherit) + run: just check + env: + NODE_ENV: "test" diff --git a/.github/workflows/client.yml b/.github/workflows/client.yml index bf2cdbbbb..8c0ac0286 100644 --- a/.github/workflows/client.yml +++ b/.github/workflows/client.yml @@ -22,32 +22,11 @@ permissions: contents: read jobs: - test: - runs-on: ubuntu-latest - container: - image: ghcr.io/zkldi/tachi-ci:main - options: --user root - steps: - - name: Checkout - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - with: - persist-credentials: false - - - name: Install dependencies - run: bun install --frozen-lockfile - - - name: Lint - run: bun run --filter tachi-client lint - - - name: Typecheck - run: bun run --filter tachi-client typecheck - build: runs-on: ubuntu-latest container: image: ghcr.io/zkldi/tachi-ci:main options: --user root - needs: test if: ${{ github.ref == 'refs/heads/main' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch') }} steps: - name: Checkout diff --git a/.github/workflows/common.yml b/.github/workflows/common.yml index f3140231e..78557d827 100644 --- a/.github/workflows/common.yml +++ b/.github/workflows/common.yml @@ -33,11 +33,6 @@ jobs: - name: Install dependencies run: bun install --frozen-lockfile - - name: Run Linter - run: bun run --filter tachi-common lint - env: - NODE_ENV: "test" - - name: Run Tests run: bun run --filter tachi-common test env: diff --git a/.github/workflows/server.yml b/.github/workflows/server.yml index e5657edeb..b2f81da09 100644 --- a/.github/workflows/server.yml +++ b/.github/workflows/server.yml @@ -97,12 +97,6 @@ jobs: - name: Install dependencies run: bun install --frozen-lockfile - - name: Lint code - run: bun run --filter tachi-server lint - - - name: Typecheck code - run: bun run --filter tachi-server typecheck - - name: Tune test Postgres for short-lived worker DBs # The restart-only knobs (fsync, shared_buffers, ...) cannot be set # because the GHA service syntax does not let us pass postgres CLI diff --git a/typescript/server/vitest.globalSetup.ts b/typescript/server/vitest.globalSetup.ts index 7b3558f9b..2adcb2aa0 100644 --- a/typescript/server/vitest.globalSetup.ts +++ b/typescript/server/vitest.globalSetup.ts @@ -1,5 +1,4 @@ import { execSync } from "node:child_process"; - import pg from "pg"; import { ensureTestCdnBucket } from "./src/test-utils/ensure-test-cdn-bucket";