-
Notifications
You must be signed in to change notification settings - Fork 1.4k
61 lines (51 loc) · 2.25 KB
/
Copy pathci.yml
File metadata and controls
61 lines (51 loc) · 2.25 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
61
name: CI
on:
pull_request:
branches: [master]
types: [opened, synchronize, reopened] # 明确排除 closed
# 同一 PR/分支有新 commit 时,自动取消正在运行的旧任务
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
test:
strategy:
matrix:
os: [ubuntu-24.04, macos-latest]
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Setup Node.js
# v6:把 package-manager-cache 限制为 npm-only,避免检测到 packageManager: pnpm@
# 时在 pnpm 装好前自动开 pnpm 缓存而抛 "Unable to locate executable file: pnpm"
#(setup-node#1351)。v5 会自动开 pnpm 缓存,必须配 pnpm/action-setup 才不报错。
uses: actions/setup-node@v6
with:
node-version: '24'
- name: Install pnpm
# 不指定 version,action-setup v6 自动读 package.json 的 packageManager
# (显式 version 会与其冲突报 "Multiple versions of pnpm specified")
uses: pnpm/action-setup@v6
- name: Read pinned openclaw version
id: pin
run: |
source openclaw.version
echo "commit=$OPENCLAW_COMMIT" >> "$GITHUB_OUTPUT"
echo "version=$OPENCLAW_VERSION" >> "$GITHUB_OUTPUT"
- name: Clone openclaw at pinned commit
# 用完整 clone 而非 --depth=1 浅 clone:apply-addons.sh 跑 git apply --3way
# 需从 object store 读补丁头里的 pre-image blob,浅 clone 不拉 blob 会导致补丁全挂。
run: |
git clone https://github.com/openclaw/openclaw.git openclaw
git -C openclaw checkout ${{ steps.pin.outputs.commit }}
# Run setup-crew.sh + apply-addons.sh separately.
# We intentionally skip the `pnpm openclaw daemon install` step that
# reinstall-daemon.sh would also execute: daemon installation requires
# a real user session (systemd on Linux, launchd on macOS) and cannot
# be meaningfully tested in a headless CI runner.
- name: Run setup-crew.sh
run: bash scripts/setup-crew.sh
- name: Run apply-addons.sh
run: bash scripts/apply-addons.sh