VisionApp/.forgejo/workflows/ci.yml

47 lines
1.1 KiB
YAML
Raw Permalink Normal View History

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