fix(ci): Enforce lint failures + add pytest job (fixes #485) #488

Merged
Timmy merged 1 commits from burn/20260412-0809-audit-fix into main 2026-04-13 00:01:00 +00:00
Owner

Fixes #485 - Expand Gitea CI/CD pipeline maturity

Three changes to validate-config.yaml:

  1. Shell lint now blocks on errors — removed || true from shellcheck step so shell lint failures actually prevent merge
  2. Python lint now blocks on errors — removed || true from flake8 step, expanded scope to scripts/, bin/, tests/
  3. Added pytest job — new python-test job runs pytest tests/ -v after syntax check passes, enforcing test suite on every PR

Also excluded .git/ from shellcheck file discovery to avoid noise.

## Fixes #485 - Expand Gitea CI/CD pipeline maturity Three changes to `validate-config.yaml`: 1. **Shell lint now blocks on errors** — removed `|| true` from shellcheck step so shell lint failures actually prevent merge 2. **Python lint now blocks on errors** — removed `|| true` from flake8 step, expanded scope to `scripts/`, `bin/`, `tests/` 3. **Added pytest job** — new `python-test` job runs `pytest tests/ -v` after syntax check passes, enforcing test suite on every PR Also excluded `.git/` from shellcheck file discovery to avoid noise.
Timmy added 1 commit 2026-04-12 12:12:03 +00:00
fix(ci): enforce lint failures and add pytest job to validate-config
Some checks failed
Architecture Lint / Linter Tests (pull_request) Successful in 9s
PR Checklist / pr-checklist (pull_request) Successful in 1m21s
Smoke Test / smoke (pull_request) Failing after 7s
Validate Config / YAML Lint (pull_request) Failing after 6s
Validate Config / JSON Validate (pull_request) Successful in 6s
Validate Config / Deploy Script Dry Run (pull_request) Successful in 6s
Validate Config / Python Syntax & Import Check (pull_request) Failing after 8s
Validate Config / Python Test Suite (pull_request) Has been skipped
Validate Config / Shell Script Lint (pull_request) Failing after 16s
Validate Config / Cron Syntax Check (pull_request) Successful in 5s
Validate Config / Playbook Schema Validation (pull_request) Successful in 7s
Architecture Lint / Lint Repository (pull_request) Failing after 8s
72de3eebdf
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
Member

Perplexity Review — PR #488

Verdict: Approve (conditional on CI green)

Summary

Hardens the CI pipeline by removing || true from both flake8 and shellcheck steps (so lint failures actually block merges), expands Python lint scope to include bin/ and tests/, adds a new python-test job running pytest after syntax checks pass, and excludes .git/ from shellcheck discovery. Fixes #485.

Blockers

  1. CI is failing — this PR removes || true which will cause existing lint violations across the repo to block all open PRs. This is intentional and correct, but means this PR should be merged first or coordinated with fixes for existing violations.

Notes

  • This is exactly the right fix — || true on lint steps means CI was never actually enforcing anything. Removing it is a high-leverage change.
  • The python-test job correctly depends on python-check via needs: python-check, ensuring tests only run after syntax validation passes.
  • Excluding .git/ from shellcheck is a sensible cleanup to avoid false positives from git hooks.
  • Clean, minimal diff — 16 additions, 2 deletions, all in one workflow file.
  • Merge priority: This should be merged before or alongside other open PRs, since it changes the CI contract for all future merges. Other PRs (#497, #489, #498, #499) will need to pass the stricter lint checks this introduces.
## Perplexity Review — PR #488 **Verdict: Approve (conditional on CI green)** ### Summary Hardens the CI pipeline by removing `|| true` from both flake8 and shellcheck steps (so lint failures actually block merges), expands Python lint scope to include `bin/` and `tests/`, adds a new `python-test` job running pytest after syntax checks pass, and excludes `.git/` from shellcheck discovery. Fixes #485. ### Blockers 1. **CI is failing** — this PR removes `|| true` which will cause existing lint violations across the repo to block *all* open PRs. This is intentional and correct, but means this PR should be merged first or coordinated with fixes for existing violations. ### Notes - This is exactly the right fix — `|| true` on lint steps means CI was never actually enforcing anything. Removing it is a high-leverage change. - The `python-test` job correctly depends on `python-check` via `needs: python-check`, ensuring tests only run after syntax validation passes. - Excluding `.git/` from shellcheck is a sensible cleanup to avoid false positives from git hooks. - Clean, minimal diff — 16 additions, 2 deletions, all in one workflow file. - **Merge priority**: This should be merged before or alongside other open PRs, since it changes the CI contract for all future merges. Other PRs (#497, #489, #498, #499) will need to pass the stricter lint checks this introduces.
Timmy merged commit 9677785d8a into main 2026-04-13 00:01:00 +00:00
Member

Approve. Surgical CI fix — enforces lint failures and adds pytest job. One nit: add requests to the pytest install step if any tests import it.

— Perplexity QA pass

**Approve.** Surgical CI fix — enforces lint failures and adds pytest job. One nit: add `requests` to the pytest install step if any tests import it. — Perplexity QA pass
Sign in to join this conversation.