Files
cleveragents-core/.forgejo/workflows/nightly-quality.yml
CoreRasurae cecca72b8e
CI / benchmark-publish (push) Has started running
CI / benchmark-regression (push) Has been skipped
CI / e2e_tests (push) Failing after 14s
CI / helm (push) Failing after 8s
CI / unit_tests (push) Failing after 21s
CI / typecheck (push) Failing after 32s
CI / build (push) Failing after 9s
CI / quality (push) Failing after 24s
CI / integration_tests (push) Failing after 15s
CI / security (push) Failing after 24s
CI / lint (push) Failing after 34s
CI / coverage (push) Has been skipped
CI / docker (push) Has been skipped
CI / push-validation (push) Successful in 20s
CI / status-check (push) Failing after 6s
CI / benchmark-publish (pull_request) Has been skipped
CI / benchmark-regression (pull_request) Failing after 1m11s
CI / coverage (pull_request) Successful in 14m34s
CI / push-validation (pull_request) Successful in 36s
CI / typecheck (pull_request) Successful in 1m14s
CI / integration_tests (pull_request) Successful in 3m42s
CI / e2e_tests (pull_request) Successful in 4m26s
CI / unit_tests (pull_request) Successful in 6m29s
CI / build (pull_request) Successful in 59s
CI / lint (pull_request) Successful in 53s
CI / quality (pull_request) Successful in 56s
CI / security (pull_request) Successful in 1m19s
CI / helm (pull_request) Successful in 53s
CI / docker (pull_request) Successful in 1m46s
CI / status-check (pull_request) Successful in 3s
test(behave): Reduce the coverage level to 96.5%
2026-05-05 02:01:49 +00:00

121 lines
3.4 KiB
YAML

name: Nightly Quality
on:
schedule:
# Run at midnight UTC every day
- cron: "0 0 * * *"
workflow_dispatch:
# Allow manual trigger for testing
vars:
docker_prefix: "http://harbor.cleverthis.com/docker/"
env:
UV_VERSION: "0.8.0"
PYTHON_VERSION: "3.13"
NOX_DEFAULT_VENV_BACKEND: "uv"
jobs:
full-quality-suite:
runs-on: docker
container:
image: ${{vars.docker_prefix}}python:3.13-slim
steps:
- name: Install system dependencies (git for merge tests)
run: |
apt-get update && apt-get install -y -qq git && rm -rf /var/lib/apt/lists/*
- uses: actions/checkout@v4
- name: Install uv
run: |
pip install -q uv==${{ env.UV_VERSION }}
- name: Install nox with uv backend
run: |
uv pip install --system nox
- name: Run lint checks via nox
run: |
nox -s lint
env:
NOX_DEFAULT_VENV_BACKEND: uv
- name: Run format check via nox
run: |
nox -s format -- --check
env:
NOX_DEFAULT_VENV_BACKEND: uv
- name: Run type checking via nox
run: |
nox -s typecheck
env:
NOX_DEFAULT_VENV_BACKEND: uv
- name: Run security scan via nox
run: |
nox -s security_scan
env:
NOX_DEFAULT_VENV_BACKEND: uv
- name: Run dead code detection via nox
run: |
nox -s dead_code
env:
NOX_DEFAULT_VENV_BACKEND: uv
- name: Run complexity analysis via nox
run: |
nox -s complexity
env:
NOX_DEFAULT_VENV_BACKEND: uv
- name: Run full Behave test suite with coverage
run: |
nox -s unit_tests-${{ env.PYTHON_VERSION }}
nox -s coverage_report
env:
NOX_DEFAULT_VENV_BACKEND: uv
- name: Run quality gates script
run: |
python scripts/check-quality-gates.py --coverage-min 96.5 --complexity-max F || echo "Quality gates script not found or failed, skipping..."
- name: Generate quality trend data
run: |
python -c "
import json, datetime
from pathlib import Path
report = {
'timestamp': datetime.datetime.now(datetime.timezone.utc).isoformat(),
'gates': {}
}
# Coverage (nox coverage_report writes to build/coverage.json)
cov_path = Path('build/coverage.json')
if cov_path.exists():
cov_data = json.loads(cov_path.read_text())
summary = cov_data.get('summary') or cov_data.get('totals') or {}
report['gates']['coverage'] = summary.get('percent_covered', 0)
# Security (nox security_scan writes to build/bandit-report.json)
sec_path = Path('build/bandit-report.json')
if sec_path.exists():
sec_data = json.loads(sec_path.read_text())
report['gates']['security_issues'] = len(sec_data.get('results', []))
Path('build/reports').mkdir(parents=True, exist_ok=True)
Path('build/reports/quality-trend.json').write_text(json.dumps(report, indent=2))
print(json.dumps(report, indent=2))
"
- name: Upload quality reports
if: always()
uses: actions/upload-artifact@v4
with:
name: nightly-quality-reports
path: build/reports/
retention-days: 90