This repository was archived by the owner on Nov 16, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
117 lines (98 loc) · 3.69 KB
/
tests-flows-install.yml
File metadata and controls
117 lines (98 loc) · 3.69 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
name: Flows Install
on:
pull_request:
push:
branches: [main]
permissions:
contents: read
concurrency:
group: flows_install-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
github_flows_install:
name: Flows Install GitHub Ubuntu 24
runs-on: ubuntu-24.04
env:
DATABASE_URI: postgresql+psycopg://vix_user:vix_password@localhost:5432/vix_db
services:
postgres:
image: postgres:17
env:
POSTGRES_USER: vix_user
POSTGRES_PASSWORD: vix_password
POSTGRES_DB: vix_db
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- uses: actions/checkout@v4
- name: Checkout Visionatrix (engine)
uses: actions/checkout@v4
with:
repository: Visionatrix/Visionatrix
path: visionatrix_main
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install Visionatrix dependencies
working-directory: visionatrix_main
run: |
python3 -m pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
python3 -m pip install ".[pgsql]"
- name: Export Visionatrix exclude flows
run: |
value=$(python3 scripts/ci/get_excludes.py flows)
echo "VISIONATRIX_EXCLUDE_FLOWS=$value" >> "$GITHUB_ENV"
- name: Export Visionatrix exclude nodes
run: |
value=$(python3 scripts/ci/get_excludes.py nodes)
echo "VISIONATRIX_INSTALL_EXCLUDE_NODES=$value" >> "$GITHUB_ENV"
- name: Run Visionatrix install
working-directory: visionatrix_main
run: python3 -m visionatrix install
- name: Install flows from CMD
working-directory: visionatrix_main
run: |
echo "Y" | VIX_MODE=SERVER VIX_SERVER_FULL_MODELS=0 python3 -m visionatrix install-flow --name=*
- name: Generate openapi-flows.json
working-directory: visionatrix_main
run: |
VIX_MODE=SERVER VIX_SERVER_FULL_MODELS=0 python3 -m visionatrix openapi --flows="*" --exclude-base --file=openapi-flows.json
- name: Create test user
working-directory: visionatrix_main
run: |
VIX_MODE=SERVER VIX_SERVER_FULL_MODELS=0 python3 -m visionatrix create-user --name=user --password=user
- name: Start Visionatrix in Server mode
working-directory: visionatrix_main
run: |
nohup python3 -m visionatrix run --ui --mode=SERVER > visionatrix.log 2>&1 &
echo "Server started in background with PID $!"
- name: Wait for Visionatrix server
run: |
max_attempts=30
for i in $(seq 1 $max_attempts); do
echo "Attempt $i/$max_attempts: Checking Visionatrix server..."
if curl -s http://localhost:8288/whoami > /dev/null; then
echo "Visionatrix server is up!"
exit 0
fi
echo "Server not ready yet. Sleeping 10s..."
sleep 10
done
echo "Server not responding after 5 minutes!"
exit 1
- name: Download test image
working-directory: visionatrix_main
run: |
wget -O tests/source-cube_rm_background.png "https://github.com/Visionatrix/VixFlowsDocs/blob/main/tests_data/source-cube_rm_background.png?raw=true"
- name: Create task for each Flow
working-directory: visionatrix_main
run: python3 tests/create_flow_tasks.py
- name: Display logs
if: ${{ always() }}
working-directory: visionatrix_main
run: cat visionatrix.log