ci(.forgejo/workflows/ci.yml): remove the attempt to upload complexity report

Forgejo shows the following error: ::error::@actions/artifact v2.0.0+, upload-artifact@v4+ and download-artifact@v4+ are not currently supported on GHES.
This commit is contained in:
2026-02-12 03:14:37 +00:00
parent a40d48cbea
commit 3cc662f5cc
+197 -204
View File
@@ -1,258 +1,251 @@
name: CI
on:
push:
branches: [master, develop]
pull_request:
branches: [master]
push:
branches: [master, develop]
pull_request:
branches: [master]
env:
UV_VERSION: "0.8.0"
PYTHON_VERSION: "3.13"
UV_VERSION: "0.8.0"
PYTHON_VERSION: "3.13"
jobs:
lint:
runs-on: docker
container:
image: python:3.13-slim
steps:
- name: Install Node.js (required by actions/checkout)
run: |
apt-get update && apt-get install -y -qq nodejs && rm -rf /var/lib/apt/lists/*
lint:
runs-on: docker
container:
image: python:3.13-slim
steps:
- name: Install Node.js (required by actions/checkout)
run: |
apt-get update && apt-get install -y -qq nodejs && rm -rf /var/lib/apt/lists/*
- uses: actions/checkout@v4
- uses: actions/checkout@v4
- name: Install uv
run: |
pip install -q uv==${{ env.UV_VERSION }}
- name: Install uv
run: |
pip install -q uv==${{ env.UV_VERSION }}
- name: Install dependencies
run: |
uv pip install --system -e .[dev]
- name: Install dependencies
run: |
uv pip install --system -e .[dev]
- name: Run ruff format check
run: |
ruff format --check .
- name: Run ruff format check
run: |
ruff format --check .
- name: Run ruff lint
run: |
ruff check .
- name: Run ruff lint
run: |
ruff check .
typecheck:
runs-on: docker
container:
image: python:3.13-slim
steps:
- name: Install Node.js (required by actions/checkout)
run: |
apt-get update && apt-get install -y -qq nodejs && rm -rf /var/lib/apt/lists/*
typecheck:
runs-on: docker
container:
image: python:3.13-slim
steps:
- name: Install Node.js (required by actions/checkout)
run: |
apt-get update && apt-get install -y -qq nodejs && rm -rf /var/lib/apt/lists/*
- uses: actions/checkout@v4
- uses: actions/checkout@v4
- name: Install uv
run: |
pip install -q uv==${{ env.UV_VERSION }}
- name: Install uv
run: |
pip install -q uv==${{ env.UV_VERSION }}
- name: Install dependencies
run: |
uv pip install --system -e .[dev]
- name: Install dependencies
run: |
uv pip install --system -e .[dev]
- name: Run pyright
run: |
pyright
- name: Run pyright
run: |
pyright
security:
runs-on: docker
container:
image: python:3.13-slim
steps:
- name: Install Node.js (required by actions/checkout)
run: |
apt-get update && apt-get install -y -qq nodejs && rm -rf /var/lib/apt/lists/*
security:
runs-on: docker
container:
image: python:3.13-slim
steps:
- name: Install Node.js (required by actions/checkout)
run: |
apt-get update && apt-get install -y -qq nodejs && rm -rf /var/lib/apt/lists/*
- uses: actions/checkout@v4
- uses: actions/checkout@v4
- name: Install uv
run: |
pip install -q uv==${{ env.UV_VERSION }}
- name: Install uv
run: |
pip install -q uv==${{ env.UV_VERSION }}
- name: Install dependencies
run: |
uv pip install --system -e .[dev]
- name: Install dependencies
run: |
uv pip install --system -e .[dev]
- name: Run bandit security scan
run: |
bandit -c pyproject.toml -r src/cleveragents --severity-level medium --format json --output build/bandit-report.json || true
bandit -c pyproject.toml -r src/cleveragents --severity-level high
- name: Run bandit security scan
run: |
bandit -c pyproject.toml -r src/cleveragents --severity-level medium --format json --output build/bandit-report.json || true
bandit -c pyproject.toml -r src/cleveragents --severity-level high
- name: Run vulture dead code detection
run: |
vulture src/cleveragents vulture_whitelist.py --min-confidence 80 --exclude src/cleveragents/discovery
- name: Run vulture dead code detection
run: |
vulture src/cleveragents vulture_whitelist.py --min-confidence 80 --exclude src/cleveragents/discovery
- name: Upload security report
if: always()
uses: actions/upload-artifact@v4
with:
name: security-report
path: build/bandit-report.json
quality:
runs-on: docker
container:
image: python:3.13-slim
steps:
- name: Install Node.js (required by actions/checkout)
run: |
apt-get update && apt-get install -y -qq nodejs && rm -rf /var/lib/apt/lists/*
quality:
runs-on: docker
container:
image: python:3.13-slim
steps:
- name: Install Node.js (required by actions/checkout)
run: |
apt-get update && apt-get install -y -qq nodejs && rm -rf /var/lib/apt/lists/*
- uses: actions/checkout@v4
- uses: actions/checkout@v4
- name: Install uv
run: |
pip install -q uv==${{ env.UV_VERSION }}
- name: Install uv
run: |
pip install -q uv==${{ env.UV_VERSION }}
- name: Install dependencies
run: |
uv pip install --system -e .[dev]
- name: Install dependencies
run: |
uv pip install --system -e .[dev]
- name: Check code complexity
run: |
mkdir -p build
radon cc src/cleveragents --min C --show-complexity --total-average --json > build/complexity-report.json || true
radon cc src/cleveragents --min F --show-complexity
echo "Complexity check complete. Methods with F grade will fail the build."
radon cc src/cleveragents --min F --show-complexity --json | python -c "import sys, json; data = json.load(sys.stdin); blocks = [b for f in data.values() for b in f]; sys.exit(1 if blocks else 0)"
- name: Check code complexity
run: |
mkdir -p build
radon cc src/cleveragents --min C --show-complexity --total-average --json > build/complexity-report.json || true
radon cc src/cleveragents --min F --show-complexity
echo "Complexity check complete. Methods with F grade will fail the build."
radon cc src/cleveragents --min F --show-complexity --json | python -c "import sys, json; data = json.load(sys.stdin); blocks = [b for f in data.values() for b in f]; sys.exit(1 if blocks else 0)"
- name: Upload complexity report
if: always()
uses: actions/upload-artifact@v4
with:
name: complexity-report
path: build/complexity-report.json
- name: Upload complexity report
if: always()
uses: actions/upload-artifact@v4
with:
name: complexity-report
path: build/complexity-report.json
behave:
runs-on: docker
strategy:
matrix:
python-version: ["3.11", "3.12", "3.13"]
container:
image: python:${{ matrix.python-version }}-slim
steps:
- name: Install Node.js (required by actions/checkout)
run: |
apt-get update && apt-get install -y -qq nodejs && rm -rf /var/lib/apt/lists/*
behave:
runs-on: docker
strategy:
matrix:
python-version: ["3.11", "3.12", "3.13"]
container:
image: python:${{ matrix.python-version }}-slim
steps:
- name: Install Node.js (required by actions/checkout)
run: |
apt-get update && apt-get install -y -qq nodejs && rm -rf /var/lib/apt/lists/*
- uses: actions/checkout@v4
- uses: actions/checkout@v4
- name: Install uv
run: |
pip install -q uv==${{ env.UV_VERSION }}
- name: Install uv
run: |
pip install -q uv==${{ env.UV_VERSION }}
- name: Install dependencies
run: |
uv pip install --system -e .[dev]
- name: Install dependencies
run: |
uv pip install --system -e .[dev]
- name: Run behaviour tests
run: |
behave -q
- name: Run behaviour tests
run: |
behave -q
coverage:
runs-on: docker
container:
image: python:3.13-slim
needs: [lint, typecheck]
steps:
- name: Install Node.js (required by actions/checkout)
run: |
apt-get update && apt-get install -y -qq nodejs && rm -rf /var/lib/apt/lists/*
coverage:
runs-on: docker
container:
image: python:3.13-slim
needs: [lint, typecheck]
steps:
- name: Install Node.js (required by actions/checkout)
run: |
apt-get update && apt-get install -y -qq nodejs && rm -rf /var/lib/apt/lists/*
- uses: actions/checkout@v4
- uses: actions/checkout@v4
- name: Install uv
run: |
pip install -q uv==${{ env.UV_VERSION }}
- name: Install uv
run: |
pip install -q uv==${{ env.UV_VERSION }}
- name: Install dependencies
run: |
uv pip install --system -e ".[dev,tests]"
- name: Install dependencies
run: |
uv pip install --system -e ".[dev,tests]"
- name: Install behave-parallel
run: |
pip install -q behave-parallel
- name: Install behave-parallel
run: |
pip install -q behave-parallel
- name: Run tests with coverage
run: |
coverage run --source=src -m behave -q --no-capture
coverage xml -o build/coverage.xml
coverage report --fail-under=85
- name: Run tests with coverage
run: |
coverage run --source=src -m behave -q --no-capture
coverage xml -o build/coverage.xml
coverage report --fail-under=85
- name: Upload coverage report
if: always()
uses: actions/upload-artifact@v4
with:
name: coverage-report
path: build/coverage.xml
- name: Upload coverage report
if: always()
uses: actions/upload-artifact@v4
with:
name: coverage-report
path: build/coverage.xml
build:
runs-on: docker
container:
image: python:3.13-slim
steps:
- name: Install Node.js (required by actions/checkout)
run: |
apt-get update && apt-get install -y -qq nodejs && rm -rf /var/lib/apt/lists/*
build:
runs-on: docker
container:
image: python:3.13-slim
steps:
- name: Install Node.js (required by actions/checkout)
run: |
apt-get update && apt-get install -y -qq nodejs && rm -rf /var/lib/apt/lists/*
- uses: actions/checkout@v4
- uses: actions/checkout@v4
- name: Install uv
run: |
pip install -q uv==${{ env.UV_VERSION }}
- name: Install uv
run: |
pip install -q uv==${{ env.UV_VERSION }}
- name: Build wheel
run: |
uv pip install --system build
python -m build --wheel
- name: Build wheel
run: |
uv pip install --system build
python -m build --wheel
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: dist
path: dist/
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: dist
path: dist/
docker:
needs: [lint, typecheck, behave, security]
runs-on: docker
steps:
- name: Install Node.js (required by actions/checkout)
run: |
apt-get update && apt-get install -y -qq nodejs && rm -rf /var/lib/apt/lists/*
docker:
needs: [lint, typecheck, behave, security]
runs-on: docker
steps:
- name: Install Node.js (required by actions/checkout)
run: |
apt-get update && apt-get install -y -qq nodejs && rm -rf /var/lib/apt/lists/*
- uses: actions/checkout@v4
- uses: actions/checkout@v4
- name: Build Docker image
run: |
docker build -t cleverernie:test .
- name: Build Docker image
run: |
docker build -t cleverernie:test .
- name: Test Docker image
run: |
docker run --rm cleverernie:test --version
- name: Test Docker image
run: |
docker run --rm cleverernie:test --version
helm:
needs: [lint, typecheck, behave, security]
runs-on: docker
container:
image: alpine/helm:latest
steps:
- name: Install Node.js (required by actions/checkout)
run: |
apk add --no-cache nodejs
helm:
needs: [lint, typecheck, behave, security]
runs-on: docker
container:
image: alpine/helm:latest
steps:
- name: Install Node.js (required by actions/checkout)
run: |
apk add --no-cache nodejs
- uses: actions/checkout@v4
- uses: actions/checkout@v4
- name: Lint Helm chart
run: |
helm lint k8s/
- name: Lint Helm chart
run: |
helm lint k8s/
- name: Template Helm chart
run: |
helm template test k8s/
- name: Template Helm chart
run: |
helm template test k8s/