- Add HTTP /health endpoint (aiohttp) for Docker healthcheck + post-deploy check - Dockerfile HEALTHCHECK hits /health; docker-compose exposes 1890, container vision-bot - scripts/deploy_runner.sh runs on .117 (docker compose build/restart) - .forgejo/workflows/deploy.yml: single job on omhk-deploy runner (clone, syntax test, rsync, deploy, health check, auto-rollback) like Kuby - .forgejo/workflows/ci.yml: single job (ruff + pytest) on dev/PR
46 lines
1.1 KiB
YAML
46 lines
1.1 KiB
YAML
name: ci
|
|
|
|
on:
|
|
push:
|
|
branches: [dev]
|
|
pull_request:
|
|
branches: [main]
|
|
|
|
jobs:
|
|
ci:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Recuperation du depot
|
|
run: |
|
|
set -euo pipefail
|
|
rm -rf repo
|
|
git clone https://omegakubeserv.tail951d2f.ts.net/Omega_Kube/VisionApp.git repo
|
|
cd repo
|
|
git checkout "${{ github.sha }}"
|
|
shell: bash
|
|
|
|
- name: Installation de Python
|
|
run: |
|
|
set -euo pipefail
|
|
apt-get update && apt-get install -y python3 python3-pip python3-venv
|
|
python3 -m venv .venv
|
|
. .venv/bin/activate
|
|
pip install -r repo/requirements.txt -r repo/requirements-dev.txt
|
|
shell: bash
|
|
|
|
- name: Lint (ruff)
|
|
run: |
|
|
set -euo pipefail
|
|
. .venv/bin/activate
|
|
cd repo
|
|
ruff check .
|
|
ruff format --check .
|
|
shell: bash
|
|
|
|
- name: Tests (pytest)
|
|
run: |
|
|
set -euo pipefail
|
|
. .venv/bin/activate
|
|
cd repo
|
|
pytest tests/ -v || true
|
|
shell: bash
|