Add Gitea Actions CI/CD pipeline

Bring nvidia-stock-bot up to the same CI/CD maturity as adguard-cidre:
pytest suite (19 tests), multi-stage Dockerfile with a dedicated test
stage, pinned requests dependency, Gitea Actions workflow (build, smoke
test, unit tests, deprecation check, Trivy critical/high scan, version
bump + registry publish + release), and a Renovate config for automated
dependency updates.
This commit is contained in:
Djeex
2026-08-22 22:54:18 +02:00
parent 10290fd28d
commit 530aeba667
9 changed files with 533 additions and 3 deletions
+17
View File
@@ -0,0 +1,17 @@
import os
import sys
_TESTS_DIR = os.path.dirname(os.path.abspath(__file__))
_REPO_ROOT = os.path.dirname(_TESTS_DIR)
# app/*.py open their JSON config files with plain relative paths, so the
# process cwd must be the directory the app modules live in — matches how
# the Dockerfile runs them (WORKDIR /app).
_APP_DIR = os.path.join(_REPO_ROOT, "app")
if not os.path.isfile(os.path.join(_APP_DIR, "gpu_checker.py")):
_APP_DIR = _REPO_ROOT # container test stage: code copied flat next to tests/
if _APP_DIR not in sys.path:
sys.path.insert(0, _APP_DIR)
os.chdir(_APP_DIR)