Skip to content

Commit

Permalink
golangci in own job
Browse files Browse the repository at this point in the history
  • Loading branch information
lingrino committed Oct 17, 2020
1 parent aed9cde commit d3ef606
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ on:
push:

jobs:
golangci:
runs-on: ubuntu-latest
steps:
- name: Lint
uses: golangci/golangci-lint-action@v2
with:
version: v1.31 # https://github.com/golangci/golangci-lint/releases
validate:
runs-on: ubuntu-latest
steps:
Expand All @@ -21,25 +28,21 @@ jobs:
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Goreleaser Check
uses: goreleaser/goreleaser-action@v2
with:
args: check
- name: Docs Check
run: |
before=$(cat docs/cli/*.md | md5sum)
go run main.go docs docs/cli
after=$(cat docs/cli/*.md | md5sum)
if [ "$before" != "$after" ]; then exit 1; fi
shell: bash
- name: Goreleaser Check
uses: goreleaser/goreleaser-action@v2
with:
args: check
- name: Go Mod Tidy
run: test -z $(go mod tidy)
- name: Go Format
run: test -z $(gofmt -l -s .)
- name: Lint
uses: golangci/golangci-lint-action@v2
with:
version: v1.31.0 # https://github.com/golangci/golangci-lint/releases
- name: Test
run: go test -cover -coverprofile=c.out -covermode=atomic -race -v ./...
- name: Upload Coverage
Expand Down

0 comments on commit d3ef606

Please sign in to comment.