Files
inkreach-official-website/.gitea/workflows/ci.yaml
T
RyRh e6ee5fd18d
CI / test (push) Failing after 34s
测试ci
2026-09-03 18:52:39 +08:00

49 lines
1.3 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
name: CI
on:
push:
branches: [develop, main, refactor/v2, feature/gitea-ci-verify-yeuimu]
pull_request:
jobs:
test:
runs-on: online # 使用你创建的 runner 标签
services:
postgres:
image: postgres:16-alpine
env:
POSTGRES_USER: test
POSTGRES_PASSWORD: test
POSTGRES_DB: inkreach_test
# 去掉 ports 映射,避免与宿主机冲突
options: >-
--health-cmd "pg_isready -U test"
--health-interval 5s
--health-timeout 3s
--health-retries 10
env:
DATABASE_URL: postgresql://test:test@postgres:5432/inkreach_test
steps:
- uses: https://gitea.com/actions/checkout@v4
# 测试 Docker 是否可用(验证挂载是否生效)
# - name: 测试 Docker 环境
# run: docker --version
- name: 安装依赖
run: corepack enable && pnpm install --frozen-lockfile
- name: Prisma generate
run: pnpm --filter @inkreach/api prisma:generate
- name: 建表(migrate deploy
run: pnpm --filter @inkreach/api exec prisma migrate deploy
- name: API 测试(真实数据库集成测试)
run: pnpm --filter @inkreach/api test
- name: Admin 前端测试
run: pnpm --filter @inkreach/admin test