Skip to content

Add GOENV to the workflows execution path#141

Merged
joselsegura merged 1 commit into
RedHatInsights:masterfrom
joselsegura:add-env-prepare-gotest
May 7, 2026
Merged

Add GOENV to the workflows execution path#141
joselsegura merged 1 commit into
RedHatInsights:masterfrom
joselsegura:add-env-prepare-gotest

Conversation

@joselsegura
Copy link
Copy Markdown
Contributor

Description

In rare scenarios we need to install some tools using go install. This new step will make those tools available for being used by the workflows.

Type of change

  • Refactor (refactoring code, removing useless files)

Testing steps

N/A

@joselsegura joselsegura requested review from a team and InsightsDroid as code owners May 7, 2026 06:06
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 7, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Enterprise

Run ID: 9ddbdf64-a5bf-4892-a4a9-bcbb0b25d799

📥 Commits

Reviewing files that changed from the base of the PR and between 53e886f and c2e5037.

📒 Files selected for processing (1)
  • .github/workflows/gotests.yaml
✅ Files skipped from review due to trivial changes (1)
  • .github/workflows/gotests.yaml

Summary by CodeRabbit

  • Chores
    • CI workflow: added a "Prepare Go env" step to the test workflow. No other workflow inputs, job configurations, commands, or test/coverage steps were modified. This change is isolated to the workflow and does not alter exported or public code entities. Estimated review effort: low.

Walkthrough

The GitHub Actions Go test workflow adds a "Prepare Go env" step that appends $(go env GOPATH)/bin to GITHUB_PATH, making Go-installed binaries in the GOPATH bin directory available on the PATH for subsequent steps.

Changes

Go Workflow Environment Setup

Layer / File(s) Summary
Workflow Configuration
.github/workflows/gotests.yaml
Adds a "Prepare Go env" step that appends $(go env GOPATH)/bin to ${GITHUB_PATH} so later job steps can execute Go binaries installed into the GOPATH bin directory.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Add GOENV to the workflows execution path' accurately describes the main change, which adds GOPATH/bin to GITHUB_PATH for Go-installed binaries.
Description check ✅ Passed The description clearly explains the purpose of the change: installing tools via 'go install' and making them available to workflows.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/gotests.yaml:
- Line 46: The shell step is using invalid parameter expansion `${go env
GOPATH}`; replace it with command substitution so the run command appends the Go
bin path correctly: change the run line that currently references `${go env
GOPATH}` to use `$(go env GOPATH)` so the command executes `go env GOPATH` and
writes its output to ${GITHUB_PATH}, ensuring the GOPATH/bin is added to PATH.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Enterprise

Run ID: e5e44b3f-a1fe-49d2-b34a-1a1d831d50c2

📥 Commits

Reviewing files that changed from the base of the PR and between 07c21fe and 04d1c13.

📒 Files selected for processing (1)
  • .github/workflows/gotests.yaml

Comment thread .github/workflows/gotests.yaml Outdated
@joselsegura joselsegura force-pushed the add-env-prepare-gotest branch from 04d1c13 to 53e886f Compare May 7, 2026 06:10
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/gotests.yaml:
- Line 46: The run step containing the command run: echo "$(go env GOPATH)/bin"
>> $GITHUB_PATH has trailing whitespace at the end of the line; remove the
trailing space character so the line ends exactly with $GITHUB_PATH (no spaces
or tabs) to satisfy the trailing-whitespace pre-commit hook.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Enterprise

Run ID: b4a7675e-5b97-4745-9dc4-531b465ec590

📥 Commits

Reviewing files that changed from the base of the PR and between 04d1c13 and 53e886f.

📒 Files selected for processing (1)
  • .github/workflows/gotests.yaml

Comment thread .github/workflows/gotests.yaml Outdated
@joselsegura joselsegura force-pushed the add-env-prepare-gotest branch from 53e886f to c2e5037 Compare May 7, 2026 06:17
@joselsegura joselsegura enabled auto-merge May 7, 2026 06:48
@joselsegura joselsegura merged commit c8b8060 into RedHatInsights:master May 7, 2026
3 checks passed
@joselsegura joselsegura deleted the add-env-prepare-gotest branch May 7, 2026 07:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants