Merge pull request #21 from newcontext-oss/dependabot/go_modules/gola… #126
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Pipeline | |
on: [push, pull_request] | |
jobs: | |
build: | |
name: Build | |
runs-on: macos-latest | |
steps: | |
- name: Set up Go 1.17 | |
uses: actions/setup-go@v5 | |
with: | |
go-version: '>=1.17.0' | |
- name: Check out source code | |
uses: actions/checkout@v4 | |
- name: Download dependencies | |
run: | | |
go install golang.org/x/lint/golint@latest | |
export PATH=$PATH:$(go env GOPATH)/bin | |
- name: Build | |
env: | |
GOPROXY: "https://proxy.golang.org" | |
run: go build . | |
test: | |
name: Test | |
runs-on: macos-latest | |
steps: | |
- name: Set up Go 1.17 | |
uses: actions/setup-go@v5 | |
with: | |
go-version: '>=1.17.0' | |
- name: Check out source code | |
uses: actions/checkout@v4 | |
- name: Download dependencies | |
run: | | |
# add executables installed with go get to PATH | |
# TODO: this will hopefully be fixed by | |
# https://github.com/actions/setup-go/issues/14 | |
export PATH=${PATH}:`go env GOPATH`/bin | |
- name: Test | |
env: | |
GOPROXY: "https://proxy.golang.org" | |
run: go test -v ./... | |
Lint: | |
name: Lint | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out source code | |
uses: actions/checkout@v4 | |
- name: Run lint | |
run: | | |
export PATH=${PATH}:`go env GOPATH`/bin | |
go install golang.org/x/lint/golint@latest | |
golint -set_exit_status | |
Staticcheck: | |
name: Staticcheck | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out source code | |
uses: actions/checkout@v4 | |
- name: Run staticcheck | |
run: | | |
export PATH=${PATH}:`go env GOPATH`/bin | |
go install honnef.co/go/tools/cmd/staticcheck@latest | |
staticcheck ./... |