Skip to content
This repository was archived by the owner on Nov 16, 2025. It is now read-only.

chore: sync with main repo - https://github.com/Visionatrix/Visionatr… #10

chore: sync with main repo - https://github.com/Visionatrix/Visionatr…

chore: sync with main repo - https://github.com/Visionatrix/Visionatr… #10

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