-
Notifications
You must be signed in to change notification settings - Fork 8
Reduce repetition in CI configuration #129
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
0473682
to
5d24387
Compare
5d24387
to
23aa7f6
Compare
…ility - Combine unit tests and go vet into a single matrix job to eliminate duplicate setup - Consolidate linting jobs into a matrix strategy removing repetitive checkout/Go setup - Streamline integration test dependency installation into single step - Centralize "check dirty" logic with conditional execution - Reduce total jobs from 7 to 4 while maintaining all functionality - Improve artifact naming consistency and make uploads conditional where appropriate This reduces ~60 lines of repetitive YAML and makes workflows faster and easier to maintain.
Remove redundant "Tests" suffix from job names: - "Unit Tests" -> "Unit" - "Integration Tests" -> "Integration" This makes the job names more concise while maintaining clarity.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR reorganizes GitHub Actions workflows to better reflect their actual functionality by renaming workflows and consolidating jobs using matrix strategies for more efficient CI/CD execution.
- Renames "Integration Tests" workflow to "Test" and restructures it to run unit tests, go vet, and integration tests
- Renames "linters" workflow to "Lint" and consolidates three separate linting jobs into a single matrix-based job
- Improves workflow organization by grouping related tasks and reducing duplication
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
File | Description |
---|---|
.github/workflows/test.yml | Restructured to run unit tests and go vet in parallel using matrix strategy, moved integration tests to separate job |
.github/workflows/linters.yml | Consolidated three separate linting jobs into single matrix-based job with conditional steps |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Removes conditional logic in workflow step by utilizing the existing 'vet' make target instead of inline shell conditionals. Addresses: #129 (comment)
- Creates reusable composite action for Go setup steps - Replaces matrix strategy with explicit separate jobs - Simplifies conditional logic by removing artifact upload from vet job - Makes workflow structure more explicit and easier to understand
- Creates reusable composite action for linter setup - Replaces matrix strategy with explicit separate jobs for each linter - Removes conditional logic by making each job explicit - Updates linters-succeed job to depend on new job names - Makes workflow structure clearer and easier to maintain
- Consolidate Go setup into single parameterized composite action - Supports configurable checkout depth, caching, and dependency download - Eliminates duplicate setup-go-linters action - Create reusable Docker Hub login composite action - Create reusable GitHub App token generation composite action - Update all workflows to use new composite actions - Standardize action versions across workflows (v3/v4/v6 for consistency) - Simplify workflow structure and reduce maintenance overhead This reduces duplication across 5 workflows and centralizes common patterns into reusable, well-tested composite actions.
Summary
Refactor GitHub Actions workflows to reduce config duplication.
The workflows are now more DRY while maintaining the same test coverage and linting checks.