Skip to content

Commit

Permalink
ci: update golangci-lint (iawia002#1041)
Browse files Browse the repository at this point in the history
* ci: update golangci-lint

* update

* update
  • Loading branch information
axetroy authored Feb 26, 2022
1 parent f84a08e commit df3bd62
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 24 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*.go text eol=lf
*.md text eol=lf
43 changes: 19 additions & 24 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,27 +15,22 @@ jobs:
os: [ubuntu-latest, macOS-latest]
name: Go ${{ matrix.go }} in ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go }}
- name: Environment
run: |
go version
go env
- name: Install tools
env:
GO111MODULE: on
run: |
go get github.com/golangci/golangci-lint/cmd/[email protected]
golangci-lint --version
- name: Lint
run: |
go mod tidy
golangci-lint run ./... -v
- name: Test
env:
GOFLAGS: -mod=mod
run: go test -race -coverpkg=./... -coverprofile=coverage.txt ./...
- name: Send coverage
run: bash <(curl -s https://codecov.io/bash)
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go }}
- name: Environment
run: |
go version
go env
- name: Lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.44
only-new-issues: true
- name: Test
env:
GOFLAGS: -mod=mod
run: go test -race -coverpkg=./... -coverprofile=coverage.txt ./...
- name: Send coverage
run: bash <(curl -s https://codecov.io/bash)

0 comments on commit df3bd62

Please sign in to comment.