-
Notifications
You must be signed in to change notification settings - Fork 0
98 lines (82 loc) · 2.5 KB
/
Copy pathci.yml
File metadata and controls
98 lines (82 loc) · 2.5 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
name: CI
on:
workflow_call:
pull_request:
push:
branches:
- main
permissions:
contents: read
concurrency:
group: ci-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
env:
CI: "1"
ANTHROPIC_API_KEY: ""
CLAUDE_CODE_OAUTH_TOKEN: ""
OPENAI_API_KEY: ""
jobs:
format:
name: Format
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Check out repository
uses: actions/checkout@v5
- name: Check Bash formatting
run: |
docker run --rm \
-v "$PWD:/mnt" \
-w /mnt \
mvdan/shfmt:v3.14.0 \
-d -i 2 -ci .
- name: Check Python formatting
uses: astral-sh/ruff-action@v4.1.0
with:
version: "0.16.5"
args: "format --check --diff"
src: "."
unit:
name: Unit
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Check out repository
uses: actions/checkout@v5
- name: Block LLM executables
run: |
mkdir -p "$RUNNER_TEMP/no-llm"
for command in claude codex; do
cat >"$RUNNER_TEMP/no-llm/$command" <<'EOF'
#!/usr/bin/env bash
printf 'LLM invocation is forbidden in CI\n' >&2
exit 97
EOF
chmod +x "$RUNNER_TEMP/no-llm/$command"
done
echo "$RUNNER_TEMP/no-llm" >>"$GITHUB_PATH"
- name: Check shell syntax
run: |
bash -n \
.github/scripts/*.sh \
bin/behavior-diff \
plugin/scripts/*.sh \
plugin/skills/behavior-diff/scripts/*.sh \
tests/*.sh
- name: Check Python syntax
run: |
python3 -m py_compile \
.agents/skills/release-behavior-diff/scripts/bump-version.py \
plugin/skills/behavior-diff/scripts/decisions.py \
plugin/skills/behavior-diff/scripts/render.py \
plugin/skills/behavior-diff/scripts/reporting/*.py
- name: Run hook unit checks
run: bash tests/hooks-test.sh
- name: Run decision unit check
run: python3 plugin/skills/behavior-diff/scripts/decisions.py --check
- name: Run report contract checks
run: bash tests/live-report-contract.sh
- name: Run release workflow checks
run: bash tests/release-workflow-test.sh
- name: Run release skill unit check
run: python3 .agents/skills/release-behavior-diff/scripts/bump-version.py --check