Skip to content

Conversation

@tduhamel42
Copy link
Collaborator

Description

Add automated CI checks to prevent worker-related issues like the secrets worker gitignore problem.

Type of Change

  • 🔧 Configuration change
  • ✅ Test additions or updates

Changes Made

Worker Validation Script

  • New file: .github/scripts/validate-workers.sh
  • Validates all workers defined in docker-compose.yml exist in repository
  • Checks required files present: Dockerfile, requirements.txt, worker.py
  • Verifies files are tracked by git (not gitignored)
  • Provides clear error messages with color-coded output

CI Workflow Updates

  • Added: validate-workers job - runs on every PR/push
  • Added: build-workers job - builds Docker images when workers/ modified
  • Updated: test-summary job now checks validation results
  • Uses Docker Buildx for build caching

PR Template

  • New file: .github/pull_request_template.md
  • Comprehensive checklist for all PR types
  • Dedicated section for worker-specific checks
  • Reminds contributors to update documentation and changelog

Problem This Solves

The secrets worker was accidentally gitignored due to broad pattern matching in .gitignore. This PR adds validation that would have caught that issue immediately.

Testing

Tested Locally

  • Validation script runs successfully
  • All 5 workers properly validated
  • Script correctly detects missing files (tested by temporarily moving a file)
  • Script detects gitignored files

CI Testing

This PR itself will test the new CI workflow! The validate-workers job should pass, and if anyone modifies workers/ in the future, the build-workers job will trigger.

Pre-Merge Checklist

  • Code follows project standards
  • Self-review completed
  • Script has proper error handling
  • All checks pass locally
  • Documentation inline with code

Additional Notes

This implements Phase 1 of the CI/CD quality improvements:

  • ✅ Worker validation script
  • ✅ Docker build validation
  • ✅ PR template

Future phases could include:

  • Phase 2: Enable integration tests
  • Phase 3: Pre-commit hooks (if team wants them)

The validation runs in ~5 seconds, Docker builds add ~5-10 minutes only when workers are modified.

Add automated validation to prevent worker-related issues:

**Worker Validation Script:**
- New script: .github/scripts/validate-workers.sh
- Validates all workers in docker-compose.yml exist
- Checks required files: Dockerfile, requirements.txt, worker.py
- Verifies files are tracked by git (not gitignored)
- Detects gitignore issues that could hide workers

**CI Workflow Updates:**
- Added validate-workers job (runs on every PR)
- Added build-workers job (runs if workers/ modified)
- Uses Docker Buildx for caching
- Validates Docker images build successfully
- Updated test-summary to check validation results

**PR Template:**
- New pull request template with comprehensive checklist
- Specific section for worker-related changes
- Reminds contributors to validate worker files
- Includes documentation and changelog reminders

These checks would have caught the secrets worker gitignore issue.

Implements Phase 1 improvements from CI/CD quality assessment.
@tduhamel42 tduhamel42 merged commit f5554d0 into dev Oct 22, 2025
tduhamel42 added a commit that referenced this pull request Nov 4, 2025
…er-builds

ci: add worker validation and Docker build checks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants