-
Notifications
You must be signed in to change notification settings - Fork 4
168 lines (142 loc) · 5.13 KB
/
ci.yml
File metadata and controls
168 lines (142 loc) · 5.13 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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
name: CI
on:
pull_request:
branches: [ main ]
push:
branches: [ main ]
jobs:
shellcheck:
name: Shell Linting
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Run ShellCheck
uses: ludeeus/action-shellcheck@master
with:
scandir: "."
format: gcc
severity: error
ignore_paths: ".github"
test:
name: Basic Tests
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Test help output
run: |
./deva.sh --help
./claude-yolo --help
- name: Test version output
run: |
./deva.sh --version
./claude-yolo --version
- name: Check version consistency
run: |
chmod +x scripts/version-check.sh
./scripts/version-check.sh
smoke:
name: Installer Smoke Test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: "22"
- name: Resolve tool versions
id: versions
env:
GH_TOKEN: ${{ github.token }}
run: bash ./scripts/resolve-tool-versions.sh
- name: Build local smoke image
run: |
docker build -t deva-smoke:ci \
--build-arg CLAUDE_CODE_VERSION="${{ steps.versions.outputs.claude_code_version }}" \
--build-arg CODEX_VERSION="${{ steps.versions.outputs.codex_version }}" \
--build-arg GEMINI_CLI_VERSION="${{ steps.versions.outputs.gemini_cli_version }}" \
--build-arg ATLAS_CLI_VERSION="${{ steps.versions.outputs.atlas_cli_version }}" \
--build-arg COPILOT_API_VERSION="${{ steps.versions.outputs.copilot_api_version }}" \
.
- name: Build core and rust images via Makefile
run: |
make build-core build-rust-image \
IMAGE_NAME=deva-smoke \
TAG=ci \
CORE_TAG=ci-core \
RUST_TAG=ci-rust \
CLAUDE_CODE_VERSION="${{ steps.versions.outputs.claude_code_version }}" \
CODEX_VERSION="${{ steps.versions.outputs.codex_version }}" \
GEMINI_CLI_VERSION="${{ steps.versions.outputs.gemini_cli_version }}" \
ATLAS_CLI_VERSION="${{ steps.versions.outputs.atlas_cli_version }}" \
COPILOT_API_VERSION="${{ steps.versions.outputs.copilot_api_version }}"
- name: Install and launch each agent without a TTY
shell: bash
run: |
set -euo pipefail
export HOME="$(mktemp -d)"
export PATH="$HOME/.local/bin:$PATH"
export DEVA_INSTALL_BASE_URL="file://$PWD"
export DEVA_DOCKER_IMAGE="deva-smoke"
export DEVA_DOCKER_TAG="ci"
export DEVA_DOCKER_IMAGE_FALLBACK=""
export DEVA_NO_DOCKER=1
bash ./install.sh
deva.sh claude -Q -- --version
deva.sh codex -Q -- --version
deva.sh gemini -Q -- --version
- name: Smoke Claude --chrome mount assembly
shell: bash
run: |
set -euo pipefail
tmp_root="$(mktemp -d)"
bridge_dir="$tmp_root/claude-mcp-browser-bridge-$(id -un)"
profile_dir="$tmp_root/chrome/Default"
mkdir -p "$bridge_dir"
chmod 700 "$bridge_dir"
mkdir -p "$profile_dir/Extensions/fcoeoabgfenejglbffodgkkbkcdhcgfn/1.0.0"
dry_run="$(
DEVA_DOCKER_IMAGE=deva-smoke \
DEVA_DOCKER_TAG=ci \
DEVA_CHROME_PROFILE_PATH="$profile_dir" \
DEVA_HOST_CHROME_BRIDGE_DIR="$bridge_dir" \
./deva.sh claude --debug --dry-run -- --chrome 2>&1
)"
printf '%s\n' "$dry_run"
grep -F -- "$bridge_dir:/deva-host-chrome-bridge" <<<"$dry_run"
grep -F -- "$profile_dir/Extensions:/home/deva/.config/google-chrome/Default/Extensions:ro" <<<"$dry_run"
- name: Smoke Chrome bridge entrypoint symlink
shell: bash
run: |
set -euo pipefail
tmp_root="$(mktemp -d)"
bridge_dir="$tmp_root/claude-mcp-browser-bridge-$(id -un)"
mkdir -p "$bridge_dir"
chmod 700 "$bridge_dir"
docker run --rm \
-e DEVA_AGENT=claude \
-e DEVA_UID="$(id -u)" \
-e DEVA_GID="$(id -g)" \
-e DEVA_CHROME_HOST_BRIDGE=1 \
-e DEVA_CHROME_HOST_BRIDGE_DIR=/deva-host-chrome-bridge \
-v "$bridge_dir:/deva-host-chrome-bridge" \
deva-smoke:ci \
bash -lc 'link="/tmp/claude-mcp-browser-bridge-$(id -un)"; test -L "$link"; test "$(readlink "$link")" = "/deva-host-chrome-bridge"'
docs:
name: Docs Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.x"
- name: Install MkDocs
run: |
python -m pip install --upgrade pip
python -m pip install -r docs-requirements.txt
- name: Build docs
run: mkdocs build --strict