forked from kunchenguid/firstmate
-
Notifications
You must be signed in to change notification settings - Fork 0
115 lines (107 loc) · 3.78 KB
/
Copy pathci.yml
File metadata and controls
115 lines (107 loc) · 3.78 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
permissions:
contents: read
jobs:
lint:
name: Lint shell scripts
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Install pinned ShellCheck
run: |
set -eu
bin/fm-install-shellcheck.sh "$RUNNER_TEMP/bin"
echo "$RUNNER_TEMP/bin" >> "$GITHUB_PATH"
# Single owner of the lint definition (file set + config + version). Do not
# re-spell the shellcheck command here; keep CI and the pre-push gate on it.
- run: bin/fm-lint.sh
tests:
name: Behavior tests
runs-on: ubuntu-latest
# The suite should finish in ~2-3 minutes; this generous cap fails loudly on a
# hung watcher or tmux test instead of riding GitHub's 360-minute default.
timeout-minutes: 15
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Install pinned ShellCheck
run: |
set -eu
bin/fm-install-shellcheck.sh "$RUNNER_TEMP/bin"
echo "$RUNNER_TEMP/bin" >> "$GITHUB_PATH"
- name: Require tmux for e2e tests
run: |
set -eu
command -v tmux >/dev/null || {
echo "::error::tmux is required for real afk injection e2e coverage"
exit 1
}
tmux -V
- name: Install tasks-axi for backlog-handoff delegation
run: |
set -eu
npm install -g tasks-axi
tasks-axi --version
- run: |
set -eu
for test_script in tests/*.test.sh; do
"$test_script"
done
macos-stock-bash:
name: Stock macOS Bash snapshot compatibility
runs-on: macos-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v6
- name: Run snapshot consumers with stock Bash
shell: /bin/bash {0}
env:
PATH: /bin:/usr/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/homebrew/bin
run: |
set -eu
case "$BASH_VERSION" in
3.2.57*) ;;
*) echo "::error::expected stock macOS Bash 3.2.57, got $BASH_VERSION"; exit 1 ;;
esac
/bin/bash --version | head -1
command -v jq >/dev/null || { echo "::error::jq is required"; exit 1; }
/bin/bash -n bin/fm-fleet-snapshot.sh
snapshot_output=$(/bin/bash tests/fm-fleet-snapshot-view.test.sh)
printf '%s\n' "$snapshot_output"
snapshot_count=$(printf '%s\n' "$snapshot_output" | grep -c '^ok - ')
[ "$snapshot_count" -eq 13 ] || {
echo "::error::expected 13 snapshot/fleet-view tests, got $snapshot_count"
exit 1
}
bearings_output=$(/bin/bash tests/fm-bearings-snapshot.test.sh)
printf '%s\n' "$bearings_output"
bearings_count=$(printf '%s\n' "$bearings_output" | grep -c '^ok - ')
[ "$bearings_count" -eq 36 ] || {
echo "::error::expected 36 Bearings tests, got $bearings_count"
exit 1
}
invariants:
name: Repo invariants
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Symlinks must stay intact
run: |
set -eu
[ "$(readlink CLAUDE.md)" = "AGENTS.md" ] || { echo "::error::CLAUDE.md must be a symlink to AGENTS.md"; exit 1; }
[ "$(readlink .claude/skills)" = "../.agents/skills" ] || { echo "::error::.claude/skills must be a symlink to ../.agents/skills"; exit 1; }
- name: Personal fleet paths must not be tracked
run: |
set -eu
tracked=$(git ls-files -- data state config projects .no-mistakes)
if [ -n "$tracked" ]; then
echo "::error::Personal fleet paths are tracked in git:"
printf '%s\n' "$tracked"
exit 1
fi