fix(ci): split unit/integration tests and fix landing test failures

- Separate unit tests (fast, no system deps) from integration test
  shards to prevent vi.mock db leakage across test types
- Fix hero test: update expected subtitle to match current copy
- Fix FAQ test: add missing json-ld alias in vitest config and mock
- Integration tests run in 4 parallel shards (30min timeout each)
This commit is contained in:
SnapOtter
2026-05-16 19:12:43 +08:00
parent d886cc2486
commit 1fb2802eea
4 changed files with 19 additions and 5 deletions
+13 -4
View File
@@ -42,8 +42,17 @@ jobs:
- uses: ./.github/actions/setup
- run: pnpm typecheck
test:
name: Test (${{ matrix.shard }}/4)
test-unit:
name: Unit Tests
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- uses: ./.github/actions/setup
- run: pnpm vitest run tests/unit/ --reporter=verbose
test-integration:
name: Integration (${{ matrix.shard }}/4)
runs-on: ubuntu-latest
timeout-minutes: 30
strategy:
@@ -65,7 +74,7 @@ jobs:
fi
- uses: ./.github/actions/setup
- run: pnpm vitest run --reporter=verbose --shard=${{ matrix.shard }}/4
- run: pnpm vitest run tests/integration/ --reporter=verbose --shard=${{ matrix.shard }}/4
pip-audit:
name: Python Dependency Audit
@@ -93,7 +102,7 @@ jobs:
build:
name: Build
runs-on: ubuntu-latest
needs: [lint, typecheck, test]
needs: [lint, typecheck, test-unit, test-integration]
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- uses: ./.github/actions/setup