This commit is contained in:
+14
-13
@@ -19,27 +19,28 @@ jobs:
|
||||
run: |
|
||||
docker build -t adguard-cidre:ci . 2>&1 | tee build.log
|
||||
if grep -q "Building wheel for" build.log; then
|
||||
echo "::warning::Une dépendance a compilé depuis les sources — vérifie la compatibilité Python/Alpine"
|
||||
echo "::warning::A dependency was built from source — check Python/Alpine compatibility"
|
||||
fi
|
||||
|
||||
- name: Smoke test
|
||||
- name: Smoke test (syntax check)
|
||||
run: |
|
||||
set +e
|
||||
timeout 10s docker run --rm adguard-cidre:ci python blocklist_scheduler.py
|
||||
code=$?
|
||||
set -e
|
||||
if [ "$code" -eq 124 ]; then
|
||||
echo "OK: le script tourne toujours après 10s (timeout normal)"
|
||||
elif [ "$code" -ne 0 ]; then
|
||||
echo "::error::Le script a crashé au démarrage (code $code)"
|
||||
exit 1
|
||||
fi
|
||||
docker run --rm --entrypoint python adguard-cidre:ci -c "
|
||||
import ast
|
||||
with open('blocklist_scheduler.py') as f:
|
||||
source = f.read()
|
||||
try:
|
||||
ast.parse(source)
|
||||
print('OK: syntax is valid')
|
||||
except SyntaxError as e:
|
||||
print(f'::error::Syntax error: {e}')
|
||||
exit(1)
|
||||
"
|
||||
|
||||
- name: Check deprecation warnings
|
||||
run: |
|
||||
docker run --rm adguard-cidre:ci python -W error::DeprecationWarning -c "import blocklist_scheduler" 2>&1 | tee deprecation.log || true
|
||||
if grep -qi "deprecat" deprecation.log; then
|
||||
echo "::warning::Avertissement de dépréciation détecté, voir logs"
|
||||
echo "::warning::Deprecation warning detected, check logs"
|
||||
fi
|
||||
|
||||
- name: Scan with Trivy (critical - blocking)
|
||||
|
||||
Reference in New Issue
Block a user