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
62
63
64
65
66
67
68
69
70
71
72
name: CI
on:
push:
branches:
tags-ignore:
pull_request:
permissions:
contents: read
jobs:
extension-tests:
runs-on: ubuntu-latest
defaults:
run:
working-directory: openclaw-extension
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "22"
- run: npm install
- run: npx vitest run
check:
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
- os: macos-14
target: aarch64-apple-darwin
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy
targets: ${{ matrix.target }}
- uses: Swatinem/rust-cache@v2
with:
# Shared across all branches — cache is only invalidated when
# Cargo.lock changes (new deps). Dramatically cuts CI time for
# PRs that don't touch dependencies (most of them).
shared-key: ${{ matrix.target }}-v2
# Cache all crates (including dev-dependencies like wiremock)
cache-all-crates: "true"
# Save cache even if tests fail, so next run has partial builds
save-if: "true"
- name: Install protoc
uses: arduino/setup-protoc@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Clippy (warnings = errors)
timeout-minutes: 10
run: cargo clippy --tests --target ${{ matrix.target }} -- -D warnings
- name: Tests
# Global safety timeout — no individual test should hang more than
# a few seconds; if the step takes longer than 8 minutes something
# is wrong and we fail fast instead of waiting for CI timeout
timeout-minutes: 8
run: cargo test --target ${{ matrix.target }}
# Formatting is enforced by dprint locally (not rustfmt)
# dprint handles Rust, Markdown, YAML, JSON, TOML