Add GitHub Actions CI workflow for build, lint, and test#5
Merged
Conversation
- Add comprehensive CI workflow with build, lint, and test jobs - Use Go 1.23.0 as specified in go.mod - Leverage existing Makefile targets (make check, make build-all) - Include cross-platform builds for Linux, macOS, and Windows - Add test coverage reporting and artifact uploads - Include security scanning with gosec (continue-on-error) - Cache Go modules for faster builds Co-Authored-By: Alec Fong <alecsanf@usc.edu>
Contributor
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
- Update actions/cache from v3 to v4 - Update actions/upload-artifact from v3 to v4 - Resolves CI failure due to deprecated action versions Co-Authored-By: Alec Fong <alecsanf@usc.edu>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add GitHub Actions CI workflow for build, lint, and test
Summary
Adds a comprehensive GitHub Actions CI workflow that leverages the existing Makefile targets to build, lint, and test the Go project. The workflow includes:
make check(combines lint, vet, fmt-check, test), security scanning with gosec, and generates test coverage reportsmake build-{target}The workflow uses Go 1.23.0 (matching go.mod) and runs on pushes to main and all pull requests.
Review & Testing Checklist for Human
continue-on-error: truefor gosec due to local network issues. Decide if this is appropriate or if security failures should block CIRecommended test plan: Create a small test PR with a trivial change to trigger this workflow and verify all steps complete successfully.
Diagram
%%{ init : { "theme" : "default" }}%% graph TB subgraph "GitHub Actions Workflow" W["ci.yml<br/>New CI Workflow"]:::major-edit end subgraph "Existing Makefile Targets" MC["make check<br/>(lint, vet, fmt-check, test)"]:::context MS["make security<br/>(gosec scan)"]:::context MTC["make test-coverage<br/>(coverage reports)"]:::context MBA["make build-all<br/>(cross-platform builds)"]:::context end subgraph "Project Files" GM["go.mod<br/>(Go 1.23.0 version)"]:::context GC[".golangci.yml<br/>(linter config)"]:::context end W -->|"uses"| MC W -->|"uses"| MS W -->|"uses"| MTC W -->|"uses"| MBA W -->|"reads version from"| GM MC -->|"configured by"| GC subgraph Legend L1[Major Edit]:::major-edit L2[Minor Edit]:::minor-edit L3[Context/No Edit]:::context end classDef major-edit fill:#90EE90 classDef minor-edit fill:#87CEEB classDef context fill:#FFFFFFNotes
continue-on-error: truedue to gosec installation issues during local testing - this prevents security scan failures from blocking the entire workflowLink to Devin run: https://app.devin.ai/sessions/8411b71869434c6099591b2fde02c9aa
Requested by: @theFong