All checks were successful
ci / ci (push) Successful in 53s
- Remove deploy.yml (runner can't reach pavillon80 network) - CI workflow: lint + test on all pushes - scripts/deploy_prod.sh: manual deploy via SSH to pavillon80:444
46 lines
1.1 KiB
YAML
46 lines
1.1 KiB
YAML
name: ci
|
|
|
|
on:
|
|
push:
|
|
branches: [main, 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
|