From 72de3eebdfd9db1fc46c849cde4d772162dd62ee Mon Sep 17 00:00:00 2001 From: Alexander Whitestone Date: Sun, 12 Apr 2026 08:11:47 -0400 Subject: [PATCH] fix(ci): enforce lint failures and add pytest job to validate-config Refs #485 - Expand Gitea CI/CD pipeline maturity Changes: - Remove '|| true' from shellcheck step so shell lint errors block merges - Remove '|| true' from flake8 step so Python lint errors block merges - Expand flake8 scope to include scripts/, bin/, tests/ - Exclude .git/ from shellcheck file discovery - Add python-test job that runs pytest on the test suite after syntax check passes --- .gitea/workflows/validate-config.yaml | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/validate-config.yaml b/.gitea/workflows/validate-config.yaml index b5fb6b80..5e6d0378 100644 --- a/.gitea/workflows/validate-config.yaml +++ b/.gitea/workflows/validate-config.yaml @@ -59,7 +59,21 @@ jobs: - name: Flake8 critical errors only run: | flake8 --select=E9,F63,F7,F82 --show-source --statistics \ - scripts/ allegro/ cron/ || true + scripts/ bin/ tests/ + + python-test: + name: Python Test Suite + runs-on: ubuntu-latest + needs: python-check + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: '3.11' + - name: Install test dependencies + run: pip install pytest pyyaml + - name: Run tests + run: python3 -m pytest tests/ -v --tb=short shell-lint: name: Shell Script Lint @@ -70,7 +84,7 @@ jobs: run: sudo apt-get install -y shellcheck - name: Lint shell scripts run: | - find . -name '*.sh' -print0 | xargs -0 -r shellcheck --severity=error || true + find . -name '*.sh' -not -path './.git/*' -print0 | xargs -0 -r shellcheck --severity=error cron-validate: name: Cron Syntax Check