Revert test workflow changes (gopath is broken)

This commit is contained in:
bvanvugt 2023-02-20 00:31:41 +00:00
parent 4f4cd62a87
commit 839ea036c2

View file

@ -21,7 +21,8 @@ jobs:
with: with:
go-version: '${{ env.GO_VERSION }}' go-version: '${{ env.GO_VERSION }}'
check-latest: true check-latest: true
- run: make test-format - name: Run gofmt
run: test -z $(gofmt -l .) || (gofmt -d . && exit 1)
lint: lint:
name: Lint (golangci-lint) name: Lint (golangci-lint)
@ -33,10 +34,13 @@ jobs:
with: with:
go-version: '${{ env.GO_VERSION }}' go-version: '${{ env.GO_VERSION }}'
check-latest: true check-latest: true
- run: make test-lint - name: Run golangci-lint
run: |
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.51.1
golangci-lint run -v ./...
test: test:
name: Tests (go test) name: Test (go test)
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: [lint] needs: [lint]
steps: steps:
@ -45,7 +49,8 @@ jobs:
with: with:
go-version: '${{ env.GO_VERSION }}' go-version: '${{ env.GO_VERSION }}'
check-latest: true check-latest: true
- run: make test-unit - name: Run go test
run: go test -race ./...
build-cli: build-cli:
name: Build CLI (go build) name: Build CLI (go build)
@ -57,6 +62,7 @@ jobs:
with: with:
go-version: '${{ env.GO_VERSION }}' go-version: '${{ env.GO_VERSION }}'
check-latest: true check-latest: true
- run: | - name: Run go build
make build-cli run: |
battlesnake --help go build ./cli/battlesnake
./battlesnake --help