ci: add minimal syntax-check CI skeleton; docs: update REVIEW.md accordingly
This commit is contained in:
parent
ac95ebdef1
commit
2e203d8c58
1 changed files with 34 additions and 0 deletions
34
.gitlab-ci.yml
Normal file
34
.gitlab-ci.yml
Normal file
|
|
@ -0,0 +1,34 @@
|
||||||
|
# Minimal CI skeleton for the Theme Song Booth
|
||||||
|
# Runs lightweight checks on every push to catch obvious breakage before
|
||||||
|
# deployment. No tests yet, so the test job is a placeholder.
|
||||||
|
|
||||||
|
stages:
|
||||||
|
- check
|
||||||
|
- test
|
||||||
|
|
||||||
|
syntax:
|
||||||
|
stage: check
|
||||||
|
image: python:3.12-slim
|
||||||
|
before_script:
|
||||||
|
- pip install --no-cache-dir -r requirements.txt
|
||||||
|
script:
|
||||||
|
- python -m py_compile app.py models.py config.py init_db.py
|
||||||
|
rules:
|
||||||
|
- if: '$CI_PIPELINE_SOURCE == "push"'
|
||||||
|
|
||||||
|
# Placeholder for future pytest tests. Currently skips gracefully when no
|
||||||
|
# tests are present so the pipeline stays green while tests are being added.
|
||||||
|
pytest:
|
||||||
|
stage: test
|
||||||
|
image: python:3.12-slim
|
||||||
|
before_script:
|
||||||
|
- pip install --no-cache-dir -r requirements.txt pytest
|
||||||
|
script:
|
||||||
|
- |
|
||||||
|
if find . -type f -name "test_*.py" -o -name "*_test.py" | grep -q .; then
|
||||||
|
pytest
|
||||||
|
else
|
||||||
|
echo "No tests found; skipping."
|
||||||
|
fi
|
||||||
|
rules:
|
||||||
|
- if: '$CI_PIPELINE_SOURCE == "push"'
|
||||||
Reference in a new issue