Skip to content

Commit

Permalink
Fix go tip unit test runs (jaegertracing#5044)
Browse files Browse the repository at this point in the history
## Which problem is this PR solving?
- Resolves jaegertracing#5043

## Description of the changes
- `go-junit-report` was getting installed successfully into the default
`$GOPATH` (`$HOME/go/bin`) but the GOPATH wasn't in the `$PATH`
environment variable, which is what caused the `go-junit-report: command
not found` error.
- It worked for the normal (non-go-tip) unit tests because the `$GOPATH`
was already set and inserted into `$PATH`.
- This explicitly sets the `$GOPATH` and inserts it into `$PATH` prior
to installing test tools.

## How was this change tested?
- Tested in [my own
fork](https://github.com/albertteoh/jaeger/actions/runs/7332463204/job/19966641893)
with some debug logging in the Makefile.

## Checklist
- [x] I have read
https://github.com/jaegertracing/jaeger/blob/master/CONTRIBUTING_GUIDELINES.md
- [x] I have signed all commits

---------

Signed-off-by: Albert Teoh <albert@packsmith.io>
Co-authored-by: Albert Teoh <albert@packsmith.io>
  • Loading branch information
albertteoh and Albert Teoh committed Dec 26, 2023
1 parent f8b3da1 commit d4e6ab4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/actions/setup-go-tip/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,12 @@ runs:
echo "Downloaded bundle:"
ls -lah gotip.tar.gz
export GOROOT="$HOME/sdk/gotip"
export GOPATH="$HOME/go"
mkdir -p $GOROOT
tar -C $GOROOT -xzf gotip.tar.gz
export PATH="$GOROOT/bin/:$PATH"
export PATH="$GOROOT/bin/:$GOPATH/bin:$PATH"
echo "GOROOT=$GOROOT" >> $GITHUB_ENV
echo "GOPATH=$GOPATH" >> $GITHUB_ENV
echo "PATH=$PATH" >> $GITHUB_ENV
echo "Active Go version:"
go version
go version

0 comments on commit d4e6ab4

Please sign in to comment.