-
Notifications
You must be signed in to change notification settings - Fork 21
53 lines (43 loc) · 1.33 KB
/
ci.yml
File metadata and controls
53 lines (43 loc) · 1.33 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
name: CI
on:
push:
branches: [ main ]
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python 3.12
uses: actions/setup-python@v4
with:
python-version: '3.12'
- name: Install test dependencies
run: |
python -m pip install --upgrade pip
pip install pytest pytest-asyncio httpx requests
pip install -e .
- name: Build Docker image
run: |
cd interpreter
docker build -t interpreter-test .
- name: Start container
run: |
cd interpreter
docker run -d --name interpreter-container -p 8123:8123 interpreter-test
- name: Wait for container to be ready
run: |
timeout 60 bash -c 'until curl -f http://localhost:8123/health; do sleep 2; done'
- name: Run functional tests
env:
TOGETHER_API_KEY: ${{ secrets.TOGETHER_API_KEY }}
run: |
python -m pytest tests/test_functional.py -v
python -m pytest tests/test_agent_data_analysis.py -v
python -m pytest tests/test_variable_isolation.py -v
python -m pytest tests/test_executors.py -v
- name: Stop container
if: always()
run: |
docker stop interpreter-container || true
docker rm interpreter-container || true