ci
This commit is contained in:
40
.github/workflows/ci.yml
vendored
Normal file
40
.github/workflows/ci.yml
vendored
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
name: CI
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ main ]
|
||||||
|
pull_request:
|
||||||
|
branches: [ main ]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
backend:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Set up Python
|
||||||
|
uses: actions/setup-python@v4
|
||||||
|
with:
|
||||||
|
python-version: '3.10'
|
||||||
|
|
||||||
|
- name: Install backend dependencies
|
||||||
|
run: |
|
||||||
|
if [ -f backend/requirements.txt ]; then
|
||||||
|
python -m pip install --upgrade pip
|
||||||
|
pip install -r backend/requirements.txt
|
||||||
|
else
|
||||||
|
echo "No backend/requirements.txt found, skipping install"
|
||||||
|
fi
|
||||||
|
|
||||||
|
- name: Sanity check - compile Python files
|
||||||
|
run: python -m compileall backend
|
||||||
|
|
||||||
|
- name: Run tests if present
|
||||||
|
run: |
|
||||||
|
if [ -d backend/tests ]; then
|
||||||
|
python -m pip install pytest
|
||||||
|
pytest -q
|
||||||
|
else
|
||||||
|
echo "No tests found; skipping pytest"
|
||||||
|
fi
|
||||||
BIN
enonce-01.pdf
Executable file
BIN
enonce-01.pdf
Executable file
Binary file not shown.
Reference in New Issue
Block a user