chore(ci): add GitHub Actions workflow#10
Conversation
Review Summary by QodoAdd GitHub Actions CI workflow for automated verification and builds
WalkthroughsDescription• Add GitHub Actions CI workflow for automated testing and building • Verify job runs dependencies, formatting, linting, and tests • Build job compiles binary and uploads artifact after verification • E2E tests job runs with Maven and Gradle matrix on build completion Diagramflowchart LR
trigger["Push to main or PR"] --> verify["Verify Job<br/>deps, fmt, lint, test"]
verify --> build["Build Job<br/>Compile binary"]
build --> e2e["E2E Tests Job<br/>Maven & Gradle matrix"]
e2e --> artifact["Upload Artifact"]
File Changes1. .github/workflows/ci.yml
|
Code Review by Qodo
1. Go version mismatch
|
3f51062 to
deede18
Compare
There was a problem hiding this comment.
Pull request overview
Adds a GitHub Actions CI workflow to automate verification, building, artifact upload, and end-to-end testing for the project’s Makefile-driven pipeline.
Changes:
- Introduces a
verifyjob runningmake deps,make fmt,make lint,make test, andmake build. - Adds a
buildjob to build the binary and upload it as an artifact. - Adds a
test-e2ejob intended to run e2e tests with a Maven/Gradle matrix and JDK 17.
Comments suppressed due to low confidence (1)
.github/workflows/ci.yml:105
- The E2E matrix currently runs
make test-e2eunchanged for bothmavenandgradle, so the exact same Go e2e test suite runs twice. Either remove the matrix (and likely the Maven/Gradle setup steps, since the tests usemvnw/gradlewwrappers), or make the matrix meaningful by passing the selected tool into the test command and filtering tests accordingly.
test-type: [maven, gradle]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "1.24"
cache: true
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: "17"
distribution: "temurin"
- name: Setup Maven
if: matrix.test-type == 'maven'
uses: stCarolas/setup-maven@v5
with:
maven-version: 3.9.6
- name: Setup Gradle
if: matrix.test-type == 'gradle'
uses: gradle/actions/setup-gradle@v4
- name: Run E2E tests (${{ matrix.test-type }})
run: make test-e2e
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
deede18 to
3c67710
Compare
3c67710 to
3bcd0e8
Compare
aa7f191 to
f55fb32
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 3 comments.
Comments suppressed due to low confidence (1)
.github/workflows/ci.yml:110
- The E2E matrix sets
test-type: [maven, gradle], but both legs run the exact samemake test-e2ecommand, so each run executes all E2E tests and the matrix just duplicates work. If the intent is to split Maven vs Gradle coverage, pass a selector into the test command (e.g.,go test ... -run TestE2E_Maven...vsTestE2E_Gradle..., or an env var consumed by the tests/Makefile) so each matrix leg runs only its subset.
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "1.26"
cache: true
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: "17"
distribution: "temurin"
- name: Setup Maven
if: matrix.test-type == 'maven'
uses: stCarolas/setup-maven@v5
with:
maven-version: 3.9.6
- name: Setup Gradle
if: matrix.test-type == 'gradle'
uses: gradle/actions/setup-gradle@v4
- name: Run E2E tests (${{ matrix.test-type }})
run: make test-e2e
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
f55fb32 to
e0d1aca
Compare
e0d1aca to
1812517
Compare
22afa4f to
fa97cf2
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
fa97cf2 to
46ebf32
Compare
46ebf32 to
5d458d3
Compare
5d458d3 to
cb99da3
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
cb99da3 to
895c899
Compare
Add CI workflow that runs key Makefile targets: - verify: deps, fmt, lint, test - build: build binary and upload artifact - test-e2e: run e2e tests with Maven and Gradle Workflow triggers on push to main and pull requests. Signed-off-by: spencercjh <spencercjh@gmail.com>
895c899 to
53124e0
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Add OpenAIProviderName constant for "openai" - Add OllamaProviderName constant for "ollama" - Update factory.go, ollama.go, and openai.go to use constants Fixes goconst lint errors in CI. Signed-off-by: spencercjh <spencercjh@gmail.com>
5ac63e8 to
6b297ac
Compare
Signed-off-by: spencercjh <spencercjh@gmail.com>
6b297ac to
0ba7b50
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 8 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
ProjectInfo now uses FrameworkData to store framework-specific info. Update E2E test to access HasSpringdocDeps through spring.Info. Signed-off-by: spencercjh <spencercjh@gmail.com>
- Add 'git diff --exit-code' after make deps to verify tidy modules - Add 'git diff --exit-code' after make fmt to verify formatting - Remove redundant build step from verify job (build job handles it) Signed-off-by: spencercjh <spencercjh@gmail.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
eb35ef3 to
18274cd
Compare
Signed-off-by: spencercjh <spencercjh@gmail.com>
18274cd to
5547306
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| name: CI | ||
|
|
There was a problem hiding this comment.
PR metadata says this change is only adding CI, but this PR also includes non-CI changes (provider name constants, factory switch updates, e2e test change, and go.mod edit). Please confirm these are intended to be in this PR (or split them) so reviewers can track non-CI behavior changes separately.
| - name: Setup golangci-lint | ||
| uses: golangci/golangci-lint-action@v7 | ||
| with: | ||
| version: v2.10 | ||
| args: --help | ||
| verify: false |
There was a problem hiding this comment.
This step is configured to run golangci-lint --help and sets verify: false, so it doesn't actually perform any linting/config validation and its intent is unclear. If the goal is to lint, let the action run with the repo config; if the goal is only to install the binary for make fmt/make lint, use an explicit install step (or an install-only mode) instead of invoking --help.
| - name: Setup golangci-lint | |
| uses: golangci/golangci-lint-action@v7 | |
| with: | |
| version: v2.10 | |
| args: --help | |
| verify: false | |
| - name: Install golangci-lint | |
| run: | | |
| go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest |
| go-version: stable | ||
| cache: true | ||
|
|
||
| - name: Set up JDK 25 | ||
| uses: actions/setup-java@v4 |
There was a problem hiding this comment.
E2E job also uses go-version: stable, which can make runs non-reproducible (especially for go test and module resolution) compared to the pinned Go version in go.mod/build job. Prefer go-version-file: go.mod or the same pinned Go version across jobs.
Add CI workflow to run Makefile rules: