diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 5daecc2..f23b8a0 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -6,7 +6,7 @@ on: pull_request: schedule: - cron: "0 0 * * *" - + jobs: build: name: Build @@ -35,11 +35,6 @@ jobs: - name: Test run: go test -v -coverprofile=profile.cov ./... - - name: Submit coverage - uses: shogo82148/actions-goveralls@v1 - with: - path-to-profile: profile.cov - static_analysis: name: Static Analysis runs-on: ubuntu-latest @@ -67,3 +62,36 @@ jobs: - name: Staticcheck run: | staticcheck ./... + + coverage: + name: Submit coverage + runs-on: ubuntu-latest + + steps: + - name: Install Go + uses: actions/setup-go@v2 + with: + go-version: '1.x' + id: go + + - name: Install required static analysis tools + run: | + go install honnef.co/go/tools/cmd/staticcheck@latest + + - name: Check out code + uses: actions/checkout@v2 + + - name: Go vet + run: go vet -composites=false ./... + + - name: Check gofmt + run: diff -u <(echo -n) <(gofmt -d -s .) + + - name: Staticcheck + run: | + staticcheck ./... + + - name: Submit coverage + uses: shogo82148/actions-goveralls@v1 + with: + path-to-profile: profile.cov