Skip to content

Conversation

@github-actions
Copy link
Contributor

Problem

The coverage-steps action (.github/actions/daily-test-improver/coverage-steps/action.yml) was attempting to use the go command without first setting up the Go environment. This caused the action to fail when running in GitHub Actions workflows with the error go: command not found.

Solution

This PR fixes the issue by:

  1. Adding proper Go setup: Replace the shell-based go version check with actions/setup-go@v6
  2. Using go.mod for version: Configure the action to read the Go version from go.mod (currently 1.25.4)
  3. Enable caching: Add caching support for faster subsequent runs
  4. Renumber steps: Update step numbers to maintain sequential order (1-9)

Changes Made

# Step 1: Setup Go environment
- name: ⚙️ Setup Go
-  shell: bash
-  run: |
-    echo "Setting up Go environment..." | tee -a coverage-steps.log
-    go version | tee -a coverage-steps.log
-    echo "✅ Go setup complete" | tee -a coverage-steps.log
+  uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6
+  with:
+    cache: true
+    go-version-file: go.mod

# Step 2: Verify Go installation
+ name: ✅ Verify Go setup
+  shell: bash
+  run: |
+    echo "Verifying Go environment..." | tee -a coverage-steps.log
+    go version | tee -a coverage-steps.log
+    echo "✅ Go setup complete" | tee -a coverage-steps.log

Impact

This fix enables the Daily Test Coverage Improver workflow to:

  • Successfully run coverage collection steps
  • Generate coverage reports (coverage.txt and coverage.html)
  • Upload coverage artifacts for analysis
  • Proceed to Phase 3 (actual test coverage improvements)

Validation

The fix follows the same pattern used in existing CI workflows:

  • .github/workflows/coverage.yaml
  • .github/workflows/system-tests.yaml

Both use actions/setup-go@v6 with go-version-file: go.mod.

Next Steps

Once this PR is merged, the next workflow run will be able to:

  1. Successfully generate baseline coverage reports
  2. Analyze current test coverage gaps
  3. Implement targeted test coverage improvements (Phase 3)

Related: This fix is required for Phase 3 of the Daily Test Coverage Improver workflow as documented in discussion #1826.

AI generated by Daily Test Coverage Improver

The coverage-steps action was attempting to use 'go' without first
setting up the Go environment using actions/setup-go. This caused
the action to fail when running in GitHub Actions workflows.

Changes:
- Replace shell-based Go version check with actions/setup-go@v6
- Add go-version-file parameter to use version from go.mod
- Enable caching for faster subsequent runs
- Renumber steps to maintain sequential order

This ensures Go is properly installed and available before running
any Go commands in the coverage collection workflow.
@github-project-automation github-project-automation bot moved this to 🏃🏻‍♂️ In Progress in 🌊 Project Board Jan 24, 2026
@devantler devantler marked this pull request as ready for review January 24, 2026 09:29
@devantler devantler self-requested a review as a code owner January 24, 2026 09:29
Copilot AI review requested due to automatic review settings January 24, 2026 09:29
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes a critical bug in the Daily Test Coverage Improver workflow where the coverage-steps composite action was attempting to use the go command without first setting up the Go environment, causing "go: command not found" errors.

Changes:

  • Added proper Go setup using actions/setup-go@v6 with go.mod version detection
  • Split the setup into two steps: Setup Go (step 1) and Verify Go setup (step 2)
  • Renumbered all subsequent steps (3-9) to maintain sequential order

@devantler
Copy link
Contributor

@copilot open a new pull request to apply changes based on the comments in this thread

Copy link
Contributor

Copilot AI commented Jan 24, 2026

@devantler I've opened a new pull request, #1922, to work on those changes. Once the pull request is ready, I'll request review from you.

…he parameter (#1922)

* Initial plan

* fix: Update setup-go version comment and remove cache parameter

- Change version comment from v6 to v6.2.0 to match codebase convention
- Remove cache: true parameter (caching enabled by default)

Co-authored-by: devantler <26203420+devantler@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: devantler <26203420+devantler@users.noreply.github.com>
@github-actions
Copy link
Contributor Author

⚠️MegaLinter analysis: Success with warnings

⚠️ MARKDOWN / markdownlint - 41 errors
.github/aw/create-agentic-workflow.md:56 error MD036/no-emphasis-as-heading Emphasis used instead of a heading [Context: "Read the gh-aw instructions"]
.github/aw/create-agentic-workflow.md:216 error MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
.github/aw/create-shared-agentic-workflow.md:16 error MD036/no-emphasis-as-heading Emphasis used instead of a heading [Context: "Build on agentic workflows"]
.github/aw/create-shared-agentic-workflow.md:23 error MD036/no-emphasis-as-heading Emphasis used instead of a heading [Context: "Prefer Docker Solutions"]
.github/aw/create-shared-agentic-workflow.md:30 error MD036/no-emphasis-as-heading Emphasis used instead of a heading [Context: "Support Read-Only Tools"]
.github/aw/create-shared-agentic-workflow.md:37 error MD036/no-emphasis-as-heading Emphasis used instead of a heading [Context: "Move Write Operations to Safe ..."]
.github/aw/create-shared-agentic-workflow.md:44 error MD036/no-emphasis-as-heading Emphasis used instead of a heading [Context: "Process Agent Output in Safe J..."]
.github/aw/create-shared-agentic-workflow.md:57 error MD036/no-emphasis-as-heading Emphasis used instead of a heading [Context: "Documentation"]
.github/aw/create-shared-agentic-workflow.md:67 error MD003/heading-style Heading style [Expected: atx; Actual: setext]
.github/aw/create-shared-agentic-workflow.md:70 error MD003/heading-style Heading style [Expected: atx; Actual: setext]
.github/aw/create-shared-agentic-workflow.md:306 error MD003/heading-style Heading style [Expected: atx; Actual: setext]
.github/aw/create-shared-agentic-workflow.md:310 error MD003/heading-style Heading style [Expected: atx; Actual: setext]
.github/aw/create-shared-agentic-workflow.md:411 error MD003/heading-style Heading style [Expected: atx; Actual: setext]
.github/aw/create-shared-agentic-workflow.md:415 error MD003/heading-style Heading style [Expected: atx; Actual: setext]
.github/aw/create-shared-agentic-workflow.md:442 error MD025/single-title/single-h1 Multiple top-level headings in the same document [Context: "Good - specific version"]
.github/aw/create-shared-agentic-workflow.md:447 error MD025/single-title/single-h1 Multiple top-level headings in the same document [Context: "Good - SHA for immutability"]
.github/aw/create-shared-agentic-workflow.md:452 error MD025/single-title/single-h1 Multiple top-level headings in the same document [Context: "Acceptable - latest for develo..."]
.github/aw/create-shared-agentic-workflow.md:458 error MD001/heading-increment Heading levels should only increment by one level at a time [Expected: h2; Actual: h3]
.github/aw/create-shared-agentic-workflow.md:462 error MD025/single-title/single-h1 Multiple top-level headings in the same document [Context: "Read-only workspace mount"]
.github/aw/create-shared-agentic-workflow.md:472 error MD001/heading-increment Heading levels should only increment by one level at a time [Expected: h2; Actual: h3]
.github/aw/create-shared-agentic-workflow.md:476 error MD025/single-title/single-h1 Multiple top-level headings in the same document [Context: "Pattern: Pass through Docker w..."]
.github/aw/debug-agentic-workflow.md:19 error MD036/no-emphasis-as-heading Emphasis used instead of a heading [Context: "Example: Debugging from a work..."]
.github/aw/debug-agentic-workflow.md:25 error MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
.github/aw/debug-agentic-workflow.md:39 error MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
.github/aw/debug-agentic-workflow.md:53 error MD036/no-emphasis-as-heading Emphasis used instead of a heading [Context: "Prerequisites"]
.github/aw/debug-agentic-workflow.md:60 error MD036/no-emphasis-as-heading Emphasis used instead of a heading [Context: "Key Commands Available"]
.github/aw/debug-agentic-workflow.md:91 error MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
.github/aw/debug-agentic-workflow.md:124 error MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
.github/aw/debug-agentic-workflow.md:162 error MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
.github/aw/debug-agentic-workflow.md:199 error MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
.github/aw/debug-agentic-workflow.md:208 error MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
.github/aw/debug-agentic-workflow.md:218 error MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
.github/aw/debug-agentic-workflow.md:256 error MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
.github/aw/debug-agentic-workflow.md:468 error MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
.github/aw/update-agentic-workflow.md:23 error MD036/no-emphasis-as-heading Emphasis used instead of a heading [Context: "Read the gh-aw instructions"]
.github/aw/upgrade-agentic-workflows.md:13 error MD036/no-emphasis-as-heading Emphasis used instead of a heading [Context: "Prerequisites"]
.github/aw/upgrade-agentic-workflows.md:20 error MD036/no-emphasis-as-heading Emphasis used instead of a heading [Context: "Key Commands Available"]
.github/aw/upgrade-agentic-workflows.md:228 error MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
.github/workflows/portfolio-analyst.md:322 error MD036/no-emphasis-as-heading Emphasis used instead of a heading [Context: "Total Savings Target: Aim for ..."]
.github/workflows/update-docs.md:149 error MD028/no-blanks-blockquote Blank line inside blockquote
docs/src/content/docs/faq.md:204 error MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "``````"]

✅ Linters with no issues

actionlint, bash-exec, git_diff, hadolint, jscpd, jsonlint, lychee, markdown-table-formatter, prettier, prettier, shellcheck, shfmt, stylelint, syft, trivy-sbom, trufflehog, v8r, v8r, yamllint

See detailed reports in MegaLinter artifacts

MegaLinter is graciously provided by OX Security

@devantler devantler added this pull request to the merge queue Jan 24, 2026
github-merge-queue bot pushed a commit that referenced this pull request Jan 24, 2026
* fix: Add proper Go setup to coverage-steps action

The coverage-steps action was attempting to use 'go' without first
setting up the Go environment using actions/setup-go. This caused
the action to fail when running in GitHub Actions workflows.

Changes:
- Replace shell-based Go version check with actions/setup-go@v6
- Add go-version-file parameter to use version from go.mod
- Enable caching for faster subsequent runs
- Renumber steps to maintain sequential order

This ensures Go is properly installed and available before running
any Go commands in the coverage collection workflow.

* Apply review feedback: update setup-go version comment and remove cache parameter (#1922)

* Initial plan

* fix: Update setup-go version comment and remove cache parameter

- Change version comment from v6 to v6.2.0 to match codebase convention
- Remove cache: true parameter (caching enabled by default)

Co-authored-by: devantler <26203420+devantler@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: devantler <26203420+devantler@users.noreply.github.com>

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: devantler <26203420+devantler@users.noreply.github.com>
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jan 24, 2026
@devantler devantler merged commit f0a70df into main Jan 24, 2026
8 checks passed
@devantler devantler deleted the test/fix-coverage-steps-go-setup-17cd0d41ff0b3d09 branch January 24, 2026 12:06
@github-project-automation github-project-automation bot moved this from 🏃🏻‍♂️ In Progress to ✅ Done in 🌊 Project Board Jan 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

2 participants