Fix makefile.
This commit is contained in:
parent
839ea036c2
commit
5cc74e7443
2 changed files with 22 additions and 27 deletions
25
.github/workflows/test.yml
vendored
25
.github/workflows/test.yml
vendored
|
|
@ -21,48 +21,39 @@ jobs:
|
|||
with:
|
||||
go-version: '${{ env.GO_VERSION }}'
|
||||
check-latest: true
|
||||
- name: Run gofmt
|
||||
run: test -z $(gofmt -l .) || (gofmt -d . && exit 1)
|
||||
- run: make test-format
|
||||
|
||||
lint:
|
||||
name: Lint (golangci-lint)
|
||||
runs-on: ubuntu-latest
|
||||
needs: [format]
|
||||
steps:
|
||||
- uses: actions/checkout@main
|
||||
- uses: actions/setup-go@main
|
||||
with:
|
||||
go-version: '${{ env.GO_VERSION }}'
|
||||
check-latest: true
|
||||
- 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 ./...
|
||||
- run: make test-lint
|
||||
|
||||
test:
|
||||
tests:
|
||||
name: Test (go test)
|
||||
runs-on: ubuntu-latest
|
||||
needs: [lint]
|
||||
needs: [format, lint]
|
||||
steps:
|
||||
- uses: actions/checkout@main
|
||||
- uses: actions/setup-go@main
|
||||
with:
|
||||
go-version: '${{ env.GO_VERSION }}'
|
||||
check-latest: true
|
||||
- name: Run go test
|
||||
run: go test -race ./...
|
||||
- run: make test-unit
|
||||
|
||||
build-cli:
|
||||
name: Build CLI (go build)
|
||||
name: Build CLI (go install)
|
||||
runs-on: ubuntu-latest
|
||||
needs: [lint]
|
||||
needs: [tests]
|
||||
steps:
|
||||
- uses: actions/checkout@main
|
||||
- uses: actions/setup-go@main
|
||||
with:
|
||||
go-version: '${{ env.GO_VERSION }}'
|
||||
check-latest: true
|
||||
- name: Run go build
|
||||
run: |
|
||||
go build ./cli/battlesnake
|
||||
./battlesnake --help
|
||||
- run: make install-cli && battlesnake --help
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue