Commit 0d34ea2
authored
chore(ci): add GitHub Actions workflow for build and test (#4)
### Lab Phase & Objective
This PR is a foundational task for **all phases**.
The objective is to implement a Continuous Integration (CI) pipeline using GitHub Actions. This establishes an automated quality gate for the repository, ensuring that all code merged into the `main` branch is compiled and tested successfully. This is a core DevSecOps practice.
### Key Architectural Decisions & Trade-offs
- **Trigger on `push` and `pull_request`:** The workflow runs on all PRs targeting `main` and on any direct pushes to `main`. This provides comprehensive protection for our primary branch.
- **Maven Wrapper (`./mvnw`):** The CI job explicitly uses the Maven Wrapper. This guarantees that the build environment in the CI runner is 100% consistent with our local development environment, eliminating "works on my machine" issues.
- **`clean verify` Goal:** Using the `verify` Maven lifecycle phase ensures the entire project is built, all unit and integration tests are executed, and the application is packaged. A failure in any of these steps will fail the build.
- **Eclipse Temurin JDK:** Chose the Temurin distribution of OpenJDK as it is a vendor-neutral, TCK-certified, and enterprise-grade build, which is a best practice for stable CI pipelines.
### Verification Strategy
- [ ] **Unit/Integration Tests:** The purpose of this PR *is* the test automation. Verification is done by observing the "Checks" section of this Pull Request.
- [x] **CI/CD Pipeline:** The workflow defined in `.github/workflows/ci.yml` should execute and pass. A green checkmark in the PR's "Checks" section indicates success.
- [ ] **Docker Compose:** N/A.
- [ ] **Manual Verification:** N/A.
### Definition of Done Checklist
- [x] The PR title follows the Conventional Commits specification (e.g., `chore: ...`).
- [x] The code adheres to project conventions (YAML syntax is correct).
- [x] The `README.md` does not require changes for this infrastructure update.
- [x] All new logic is covered by automated tests. (This PR *is* the test automation).
- [x] Security implications of the changes have been considered (secures the build process).
- [ ] Observability implications (metrics, logs, traces) have been considered. (N/A for this change).1 parent a0f4c34 commit 0d34ea2
1 file changed
+29
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
0 commit comments