Description:
I am using v5 of this action and the $PATH doesn't seem to be getting set. I have CLI tool that I am building and in one of my tests, I mimic running the CLI tool. Locally, I use go install then run go test ./... and since my $PATH is set, it can find the program.
For example, I have this code snippet in a test file that runs the program and some arguments:
for _, test := range tests {
cmd := exec.Command("poke-cli", test.args...)
var out bytes.Buffer
cmd.Stdout = &out
cmd.Stderr = &out
This action used to work just fine as you can see here in previous attempts, but now, it is failing and I am not sure what happened. It first failed in this Pull Request but I didn't touch the go_test.yml file.
Here is the whole go_test.yml file:
name: Test
on:
pull_request:
types: [opened, reopened, synchronize]
jobs:
tests:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.21
- name: Install dependencies
run: |
go get .
- name: Run tests
run: go test -v ./...
Description: I am using
v5
of this action and the$PATH
doesn't seem to be getting set. I have CLI tool that I am building and in one of my tests, I mimic running the CLI tool. Locally, I usego install
then rungo test ./...
and since my$PATH
is set, it can find the program.For example, I have this code snippet in a test file that runs the program and some arguments:
This action used to work just fine as you can see here in previous attempts, but now, it is failing and I am not sure what happened. It first failed in this Pull Request but I didn't touch the
go_test.yml
file.Here is the whole
go_test.yml
file:Action version:
v5
Platform:
Runner type:
Tools version: Go:
1.21
Repro steps:
Here is a Pull Request where I am trying to run this Action and it's failing: https://github.com/digitalghost-dev/poke-cli/pull/19
Expected behavior:
$PATH
is set when using this action.Actual behavior: Getting an error that the binary can't be found in
$PATH
: