-
Notifications
You must be signed in to change notification settings - Fork 8
58 lines (51 loc) · 1.44 KB
/
be-installation-test.yml
File metadata and controls
58 lines (51 loc) · 1.44 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
name: Test backend installation
on:
pull_request:
branches:
- develop
- main
paths:
- '**.py'
- '**.txt'
- '**/pyproject.toml'
- '**/uv.lock'
workflow_dispatch:
permissions:
checks: read
contents: read
jobs:
installation-backend:
name: Test backend installation
runs-on: ubuntu-latest
steps:
- name: Check out Git repository
uses: actions/checkout@v6
- name: Set up Python environment
uses: actions/setup-python@v6
with:
python-version: "3.11"
token: ${{ secrets.GITHUB_TOKEN }}
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
version: "latest"
enable-cache: true
prune-cache: true
- name: Install dependencies
run: uv sync --locked --all-extras --dev --project backend-agent
- name: Start server and check health
working-directory: backend-agent
run: |
DISABLE_AGENT=1 DB_PATH=${RUNNER_TEMP}/data.db uv run main.py > server.log 2>&1 &
for i in {1..60}; do
sleep 1
status=$(curl -s -o /dev/null -w "%{http_code}" http://localhost:8080/health || true)
if [ "$status" -eq 200 ]; then
echo "Health check succeeded"
cat server.log
exit 0
fi
done
echo "Health check failed after waiting"
cat server.log
exit 1