This commit is contained in:
+14
-13
@@ -19,27 +19,28 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
docker build -t adguard-cidre:ci . 2>&1 | tee build.log
|
docker build -t adguard-cidre:ci . 2>&1 | tee build.log
|
||||||
if grep -q "Building wheel for" build.log; then
|
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
|
fi
|
||||||
|
|
||||||
- name: Smoke test
|
- name: Smoke test (syntax check)
|
||||||
run: |
|
run: |
|
||||||
set +e
|
docker run --rm --entrypoint python adguard-cidre:ci -c "
|
||||||
timeout 10s docker run --rm adguard-cidre:ci python blocklist_scheduler.py
|
import ast
|
||||||
code=$?
|
with open('blocklist_scheduler.py') as f:
|
||||||
set -e
|
source = f.read()
|
||||||
if [ "$code" -eq 124 ]; then
|
try:
|
||||||
echo "OK: le script tourne toujours après 10s (timeout normal)"
|
ast.parse(source)
|
||||||
elif [ "$code" -ne 0 ]; then
|
print('OK: syntax is valid')
|
||||||
echo "::error::Le script a crashé au démarrage (code $code)"
|
except SyntaxError as e:
|
||||||
exit 1
|
print(f'::error::Syntax error: {e}')
|
||||||
fi
|
exit(1)
|
||||||
|
"
|
||||||
|
|
||||||
- name: Check deprecation warnings
|
- name: Check deprecation warnings
|
||||||
run: |
|
run: |
|
||||||
docker run --rm adguard-cidre:ci python -W error::DeprecationWarning -c "import blocklist_scheduler" 2>&1 | tee deprecation.log || true
|
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
|
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
|
fi
|
||||||
|
|
||||||
- name: Scan with Trivy (critical - blocking)
|
- name: Scan with Trivy (critical - blocking)
|
||||||
|
|||||||
Reference in New Issue
Block a user