Skip to content

Commit

Permalink
Install gotestfmt in dedicated step
Browse files Browse the repository at this point in the history
Easier then messing with permissions
  • Loading branch information
Sean-Der committed Sep 8, 2023
1 parent eb0141f commit 13fc094
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions .github/workflows/test-i386.reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,23 @@ jobs:
key: ${{ runner.os }}-i386-go-${{ hashFiles('**/go.sum') }}
restore-keys: ${{ runner.os }}-i386-go-

- name: Build worker
run: |
docker build -t test_runner_i386_${{inputs.go-version}}:latest -<<EOF
FROM i386/golang:${{inputs.go-version}}-alpine
RUN go install github.com/gotesttools/gotestfmt/v2/cmd/gotestfmt@latest
EOF
- name: Run test
run: |
mkdir -p $HOME/go/pkg/mod $HOME/.cache
docker run \
-u $(id -u):$(id -g) \
-e "GO111MODULE=on" \
-e "CGO_ENABLED=0" \
-e "GOPROXY=direct" \
-e "GOSUMDB=off" \
-v $GITHUB_WORKSPACE:/go/src/github.com/pion/$(basename $GITHUB_WORKSPACE) \
-v $HOME/go/pkg/mod:/go/pkg/mod \
-v $HOME/.cache:/.cache \
-w /go/src/github.com/pion/$(basename $GITHUB_WORKSPACE) \
i386/golang:${{inputs.go-version}}-alpine \
/bin/sh -c "go install github.com/gotesttools/gotestfmt/v2/cmd/gotestfmt@latest; /usr/local/go/bin/go test ${TEST_EXTRA_ARGS:-} -json -v ./... | gotestfmt"
test_runner_i386_${{inputs.go-version}}:latest \
/bin/sh -c "/usr/local/go/bin/go test ${TEST_EXTRA_ARGS:-} -json -v ./... | gotestfmt" ${TEST_EXTRA_ARGS:-} \

0 comments on commit 13fc094

Please sign in to comment.