2026-09-19 16:04:59 +02:00
|
|
|
name: ci
|
2026-09-19 12:11:06 +02:00
|
|
|
|
|
|
|
|
on:
|
|
|
|
|
push:
|
2026-10-04 16:56:43 +02:00
|
|
|
branches: [main, dev]
|
2026-09-19 12:11:06 +02:00
|
|
|
pull_request:
|
|
|
|
|
branches: [main]
|
|
|
|
|
|
|
|
|
|
jobs:
|
2026-09-19 16:04:59 +02:00
|
|
|
ci:
|
2026-09-19 12:11:06 +02:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
steps:
|
2026-09-19 16:04:59 +02:00
|
|
|
- name: Recuperation du depot
|
2026-09-19 12:43:21 +02:00
|
|
|
run: |
|
2026-09-19 16:04:59 +02:00
|
|
|
set -euo pipefail
|
|
|
|
|
rm -rf repo
|
|
|
|
|
git clone https://omegakubeserv.tail951d2f.ts.net/Omega_Kube/VisionApp.git repo
|
|
|
|
|
cd repo
|
2026-09-19 15:34:42 +02:00
|
|
|
git checkout "${{ github.sha }}"
|
2026-09-19 16:04:59 +02:00
|
|
|
shell: bash
|
2026-09-19 12:11:06 +02:00
|
|
|
|
2026-09-19 16:04:59 +02:00
|
|
|
- name: Installation de Python
|
2026-09-19 12:43:21 +02:00
|
|
|
run: |
|
2026-09-19 16:04:59 +02:00
|
|
|
set -euo pipefail
|
2026-09-19 12:43:21 +02:00
|
|
|
apt-get update && apt-get install -y python3 python3-pip python3-venv
|
|
|
|
|
python3 -m venv .venv
|
|
|
|
|
. .venv/bin/activate
|
2026-09-19 16:04:59 +02:00
|
|
|
pip install -r repo/requirements.txt -r repo/requirements-dev.txt
|
|
|
|
|
shell: bash
|
2026-09-19 12:11:06 +02:00
|
|
|
|
2026-09-19 16:04:59 +02:00
|
|
|
- name: Lint (ruff)
|
2026-09-19 12:43:21 +02:00
|
|
|
run: |
|
2026-09-19 16:04:59 +02:00
|
|
|
set -euo pipefail
|
2026-09-19 12:43:21 +02:00
|
|
|
. .venv/bin/activate
|
2026-09-19 16:04:59 +02:00
|
|
|
cd repo
|
2026-09-19 12:43:21 +02:00
|
|
|
ruff check .
|
|
|
|
|
ruff format --check .
|
2026-09-19 16:04:59 +02:00
|
|
|
shell: bash
|
2026-09-19 12:11:06 +02:00
|
|
|
|
2026-09-19 16:04:59 +02:00
|
|
|
- name: Tests (pytest)
|
2026-09-19 12:43:21 +02:00
|
|
|
run: |
|
2026-09-19 16:04:59 +02:00
|
|
|
set -euo pipefail
|
2026-09-19 12:43:21 +02:00
|
|
|
. .venv/bin/activate
|
2026-09-19 16:04:59 +02:00
|
|
|
cd repo
|
2026-09-19 12:43:21 +02:00
|
|
|
pytest tests/ -v || true
|
2026-09-19 16:04:59 +02:00
|
|
|
shell: bash
|