Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .github/actions/setup-go-tip/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,17 @@ runs:
PATH="$GOROOT/bin:$GOPATH/bin:$PATH"
echo "GOPATH=$GOPATH" >> $GITHUB_ENV
echo "PATH=$PATH" >> $GITHUB_ENV
# Unset GOTOOLCHAIN to ensure gotip is used, not pinned to a stable version
echo "GOTOOLCHAIN=" >> $GITHUB_ENV
# Remove any stale go binaries from previous toolchain installations
# This prevents shadowing of gotip's go binary
for go_path in /opt/hostedtoolcache/go/*/x64/bin/go /home/runner/go/bin/go; do
if [ -x "$go_path" ] 2>/dev/null; then
echo "Removing old go binary: $go_path"
rm -f "$go_path" || true
fi
done


- name: Check Go Version
shell: bash
Expand Down
11 changes: 9 additions & 2 deletions .github/workflows/ci-unit-tests-go-tip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ permissions:

jobs:
unit-tests-go-tip:
if: github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'run-all-workflows')
# Temporarily removed condition to test in PR - will restore before merge
# if: github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'run-all-workflows')
permissions:
checks: write
runs-on: ubuntu-latest
Expand All @@ -30,6 +31,7 @@ jobs:
uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0
with:
go-version: 1.25.x
cache: false
Copy link
Member

Choose a reason for hiding this comment

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

why?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

according to me the cache: false setting prevents the go1.25.4 module cache from persisting and interfering with gotip's isolated environment.


- name: Install test deps
# even though the same target runs from test-ci, running it separately makes for cleaner log in GH workflow
Expand All @@ -40,13 +42,18 @@ jobs:
with:
gh_token: ${{ secrets.GITHUB_TOKEN }}

- name: Clean Go cache for gotip
- name: Clean Go cache and rebuild stdlib for gotip
run: |
go clean -cache
go clean -modcache
env:
GOTOOLCHAIN: auto

Comment on lines +49 to +51
Copy link
Contributor

Choose a reason for hiding this comment

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

Setting GOTOOLCHAIN: auto conflicts with the GOTOOLCHAIN= (unset) in the setup-go-tip action (line 69). When GOTOOLCHAIN is set to "auto", Go will automatically select and download a toolchain version, potentially bypassing gotip. This contradicts the stated goal of ensuring gotip is used. Either remove this env block or change to GOTOOLCHAIN: local to force using the installed gotip.

env:
  GOTOOLCHAIN: local
Suggested change
env:
GOTOOLCHAIN: auto
env:
GOTOOLCHAIN: local

Spotted by Graphite Agent

Fix in Graphite


Is this helpful? React 👍 or 👎 to let us know.


- name: Run unit tests
run: make test-ci
env:
GOTOOLCHAIN: auto

- name: Lint
run: echo skip linting on Go tip
Loading