mirror of
https://github.com/zkldi/Tachi.git
synced 2026-09-22 23:18:05 +03:00
feat: check.yml (#1541)
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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"
|
||||
@@ -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
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import { execSync } from "node:child_process";
|
||||
|
||||
import pg from "pg";
|
||||
|
||||
import { ensureTestCdnBucket } from "./src/test-utils/ensure-test-cdn-bucket";
|
||||
|
||||
Reference in New Issue
Block a user