Files
arbitrade/.gitea/workflows/ci.yml
T
zwitschi 1df4b11aef
CI / lint-test-build (push) Failing after 1m7s
Add HTML templates for dashboard, metrics, overview, and backtesting
- Introduced new HTML templates for the dashboard, metrics, overview, and backtesting functionalities.
- Implemented partial templates for metrics, overview, audit, controls, and charts to enhance modularity.
- Updated the Jinja2 template resolution logic to support different deployment environments.
- Added a health check template to display the service status.
- Included a test suite to verify the template resolution logic.
- Updated `pyproject.toml` to include new HTML templates in the package data.
2026-06-02 14:16:42 +02:00

83 lines
2.1 KiB
YAML

name: CI
on:
push:
branches: ["main", "master"]
tags: ["v*"]
pull_request:
jobs:
lint-test-build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install project + dev deps
run: |
python -m pip install --upgrade pip
pip install -e .[dev]
pip install pip-audit
- name: Ruff
run: ruff check .
# - name: Black
# run: black --check .
- name: MyPy
run: mypy src
- name: Dependency audit
run: pip-audit -r requirements/latest-runtime.in
- name: Secret scan (worktree + git history)
run: python scripts/security_scan.py
- name: Tests
run: pytest -q
- name: Package template smoke check
run: |
pip install build
python -m build --wheel
pip uninstall -y arbitrade
pip install --force-reinstall dist/*.whl
python - <<'PY'
from arbitrade.api import routes
template = routes.templates.env.get_template("dashboard.html")
rendered = template.render()
if "<!DOCTYPE html>" not in rendered:
raise SystemExit("dashboard template render smoke check failed")
PY
- name: Latency guardrails
run: |
python scripts/check_latency_regression.py \
--baseline ops/performance/latency_baseline.json \
--thresholds ops/performance/latency_thresholds.json \
--iterations 600
- name: Login to Gitea registry
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
registry: git.allucanget.biz
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_TOKEN }}
- name: Build and push image
if: github.event_name != 'pull_request'
uses: docker/build-push-action@v6
with:
context: .
push: true
tags: git.allucanget.biz/allucanget/arbitrade:latest