Compare commits
2
Commits
bb13e398df
...
532c3e4646
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
532c3e4646 | ||
|
|
4753d80891 |
+37
-3
@@ -3,6 +3,8 @@ name: CI
|
|||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [main]
|
branches: [main]
|
||||||
|
pull_request:
|
||||||
|
branches: [main]
|
||||||
schedule:
|
schedule:
|
||||||
- cron: "0 6 * * 1"
|
- cron: "0 6 * * 1"
|
||||||
|
|
||||||
@@ -14,11 +16,43 @@ jobs:
|
|||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Build Docker image
|
- name: Build Docker image
|
||||||
run: docker build -t adguard-cidre:ci .
|
run: |
|
||||||
|
docker build -t adguard-cidre:ci . 2>&1 | tee build.log
|
||||||
|
if grep -q "Building wheel for" build.log; then
|
||||||
|
echo "::warning::A dependency was built from source — check Python/Alpine compatibility"
|
||||||
|
fi
|
||||||
|
|
||||||
- name: Scan with Trivy
|
- name: Smoke test (syntax check)
|
||||||
|
run: |
|
||||||
|
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::Deprecation warning detected, check logs"
|
||||||
|
fi
|
||||||
|
|
||||||
|
- name: Scan with Trivy (critical - blocking)
|
||||||
run: |
|
run: |
|
||||||
docker run --rm \
|
docker run --rm \
|
||||||
-e DOCKER_HOST=tcp://dockerhost:2375 \
|
-e DOCKER_HOST=tcp://dockerhost:2375 \
|
||||||
--add-host=dockerhost:host-gateway \
|
--add-host=dockerhost:host-gateway \
|
||||||
aquasec/trivy:0.74.0 image --exit-code 0 --severity HIGH,CRITICAL adguard-cidre:ci
|
aquasec/trivy:0.74.0 image --exit-code 1 --severity CRITICAL adguard-cidre:ci
|
||||||
|
|
||||||
|
- name: Scan with Trivy (high - informative)
|
||||||
|
run: |
|
||||||
|
docker run --rm \
|
||||||
|
-e DOCKER_HOST=tcp://dockerhost:2375 \
|
||||||
|
--add-host=dockerhost:host-gateway \
|
||||||
|
aquasec/trivy:0.74.0 image --exit-code 0 --severity HIGH adguard-cidre:ci
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
FROM python:3.13-alpine
|
FROM python:3.14-alpine
|
||||||
|
|
||||||
ENV TZ=Europe/Paris
|
ENV TZ=Europe/Paris
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user