Merge pull request #201 from google/pkern-patch-1 #107
This file contains hidden or 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: go-presubmit | |
| on: | |
| push: | |
| branches: ['master'] | |
| pull_request: | |
| paths: ['go/**', '.github/workflows/presubmit-go.yml'] | |
| workflow_dispatch: {} | |
| defaults: | |
| run: | |
| working-directory: go | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: gofmt | |
| run: test -z "$(gofmt -d . | tee >&2)" | |
| - name: golint | |
| run: | | |
| go install golang.org/x/lint/golint@latest | |
| $(go env GOPATH)/bin/golint -set_exit_status=1 ./... | |
| unit-test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Run tests | |
| run: go test ./... |