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
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
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
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user