-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (38 loc) · 1.2 KB
/
Copy pathci.yml
File metadata and controls
46 lines (38 loc) · 1.2 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
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install dependencies
run: pip install -r requirements.txt
- name: Create stub Claude CLI
run: |
echo '#!/bin/sh' > /usr/local/bin/claude
echo 'echo "{\"result\":\"stub\",\"model\":\"stub\",\"input_tokens\":0,\"output_tokens\":0}"' >> /usr/local/bin/claude
chmod +x /usr/local/bin/claude
- name: Start server
run: |
uvicorn app.main:app --host 127.0.0.1 --port 8020 &
for i in $(seq 1 10); do
curl -s http://localhost:8020/health > /dev/null 2>&1 && break
sleep 1
done
env:
API_SECRET_TOKEN: test-token-for-ci
CLAUDE_CLI_PATH: claude
DEFAULT_MODEL: sonnet
ALLOWED_PATHS: ${{ github.workspace }}
- name: Run non-AI tests
run: python3 test_server.py --skip-ai --token test-token-for-ci
env:
API_SECRET_TOKEN: test-token-for-ci