ci: allow web/manual pipeline trigger for CI skeleton
This commit is contained in:
parent
2e203d8c58
commit
214b9f803d
1 changed files with 3 additions and 7 deletions
|
|
@ -1,7 +1,3 @@
|
|||
# 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
|
||||
|
|
@ -15,9 +11,8 @@ syntax:
|
|||
- python -m py_compile app.py models.py config.py init_db.py
|
||||
rules:
|
||||
- if: '$CI_PIPELINE_SOURCE == "push"'
|
||||
- if: '$CI_PIPELINE_SOURCE == "web"'
|
||||
|
||||
# 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
|
||||
|
|
@ -25,10 +20,11 @@ pytest:
|
|||
- pip install --no-cache-dir -r requirements.txt pytest
|
||||
script:
|
||||
- |
|
||||
if find . -type f -name "test_*.py" -o -name "*_test.py" | grep -q .; then
|
||||
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"'
|
||||
- if: '$CI_PIPELINE_SOURCE == "web"'
|
||||
|
|
|
|||
Reference in a new issue