-
Notifications
You must be signed in to change notification settings - Fork 589
60 lines (50 loc) · 1.52 KB
/
precheck.yml
File metadata and controls
60 lines (50 loc) · 1.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: Pre Check
on:
push:
branches: [v4-next]
paths-ignore:
- 'site/**'
- '*.md'
pull_request:
paths-ignore:
- 'site/**'
- '*.md'
jobs:
lintAndTestLegacy:
timeout-minutes: 60
strategy:
matrix:
node-version: ['lts/*']
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Git checkout
uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9
run_install: false
# ✅ 安装最新 docker compose v2.37.1
- name: Install Docker Compose v2
run: |
mkdir -p ~/.docker/cli-plugins/
curl -SL https://github.com/docker/compose/releases/download/v2.37.1/docker-compose-linux-x86_64 -o ~/.docker/cli-plugins/docker-compose
chmod +x ~/.docker/cli-plugins/docker-compose
docker compose version
# ✅ 启动所有依赖服务(redis, rabbitmq, kafka, zookeeper等)
- name: Start services via docker compose
run: docker compose -f docker-compose.ci.yml up -d
# ✅ 简单 sleep 确保服务就绪
- name: Wait for services to be ready
run: sleep 20
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
# ✅ 各种业务逻辑执行不变
- run: pnpm install
- run: pnpm build --if-present
- run: pnpm lint
- run: pnpm lint:cycle