name: Go on: pull_request: branches: - feature/* push: branches: - feature/* jobs: review: name: Review code runs-on: ubuntu-latest steps: - uses: actions/checkout@master - name: Check styling error uses: "cedrickring/golang-action@1.3.0" with: args: go get -u golang.org/x/lint/golint; go list ./... | grep -v /vendor/ | xargs -L1 golint -set_exit_status - name: Check missing error check uses: "cedrickring/golang-action@1.3.0" with: args: go get -u github.com/kisielk/errcheck; ls -la; errcheck ./... - name: Check suspicious constructs (1) uses: "cedrickring/golang-action@1.3.0" with: args: go get honnef.co/go/tools/cmd/staticcheck; staticcheck -checks all ./... # https://staticcheck.io/docs/checks - name: Check suspicious constructs (2) uses: "cedrickring/golang-action@1.3.0" with: args: go vet ./... security: name: Review security runs-on: ubuntu-latest steps: - uses: actions/checkout@master - name: Check missing error check uses: "cedrickring/golang-action@1.3.0" with: args: go get github.com/securego/gosec/cmd/gosec; gosec ./... # https://github.com/securego/gosec testable: name: Testable runs-on: ubuntu-latest steps: - uses: actions/checkout@master - name: build uses: "cedrickring/golang-action@1.3.0" with: args: go test ./... buildable: name: Buildable runs-on: ubuntu-latest steps: - uses: actions/checkout@master - name: build uses: "cedrickring/golang-action@1.3.0" with: args: go build ./cmd/api/main.go