-
Notifications
You must be signed in to change notification settings - Fork 70
chore: Update GHActions to source go version from go.mod #889
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
Signed-off-by: Giulio Frasca <[email protected]>
WalkthroughThe GitHub Actions workflows for functional, unit, integration, and nightly tests were updated to use Changes
Sequence Diagram(s)sequenceDiagram
participant GitHub Actions
participant Workflow YAML
participant actions/setup-go
participant go.mod
GitHub Actions->>Workflow YAML: Trigger workflow
Workflow YAML->>actions/setup-go: Setup Go (v5) with go-version-file
actions/setup-go->>go.mod: Read Go version
go.mod-->>actions/setup-go: Return version
actions/setup-go-->>Workflow YAML: Go environment ready
Workflow YAML->>GitHub Actions: Proceed with tests
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Actionable comments posted: 0
🧹 Nitpick comments (4)
.github/workflows/nightly_tests.yml (1)
12-15
: Leverage built-in caching to speed up the nightly pipeline
actions/setup-go@v5
can cache the module download/build cache out-of-the-box. Enabling it on the long-running nightly job typically shaves several minutes off each run.- uses: actions/setup-go@v5 - with: - go-version-file: go.mod + uses: actions/setup-go@v5 + with: + go-version-file: go.mod + cache: true # enable Go module cache + cache-dependency-path: go.sumMake sure
go.sum
is at the repo root; otherwise adjust the path accordingly..github/workflows/functests.yml (1)
10-12
: Enable the Go module cache for faster functional testsThe functional-test matrix rebuilds the binaries every PR, so cache hits pay back quickly.
- uses: actions/setup-go@v5 - with: - go-version-file: go.mod + uses: actions/setup-go@v5 + with: + go-version-file: go.mod + cache: true + cache-dependency-path: go.sum.github/workflows/unittests.yml (1)
10-12
: Small tweak: add caching to the unit-test workflowSame rationale as the other jobs—unit tests run on every push, so caching saves CI minutes and GitHub runner time.
- uses: actions/setup-go@v5 - with: - go-version-file: go.mod + uses: actions/setup-go@v5 + with: + go-version-file: go.mod + cache: true + cache-dependency-path: go.sum.github/workflows/kind-integration.yml (1)
43-46
: Consider caching Go modules to speed up KinD integration testsThe KinD job is one of the slowest in the suite; module caching can materially shorten the “go mod download” phase.
- uses: actions/setup-go@v5 - with: - go-version-file: go.mod + uses: actions/setup-go@v5 + with: + go-version-file: go.mod + cache: true + cache-dependency-path: go.sum
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
.github/workflows/functests.yml
(1 hunks).github/workflows/kind-integration.yml
(1 hunks).github/workflows/nightly_tests.yml
(1 hunks).github/workflows/unittests.yml
(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (4)
- GitHub Check: dspo-tests
- GitHub Check: precommit
- GitHub Check: unittest
- GitHub Check: functest
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.
/approve
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: mprahl The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Source the go version used in github actions dynamically from the repo go.mod file
Testing instructions
CI Passes
Checklist
Summary by CodeRabbit