Skip to content

Commit

Permalink
fix ci
Browse files Browse the repository at this point in the history
  • Loading branch information
smx-Morgan committed Oct 19, 2024
1 parent cd21462 commit a0ecd79
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 10 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/pr-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Set up Go
uses: actions/setup-go@v2
uses: actions/setup-go@v3
with:
go-version: 1.21

- uses: actions/cache@v2
- uses: actions/cache@v3
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
Expand Down
9 changes: 2 additions & 7 deletions .github/workflows/push-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ jobs:
- 8761:8761

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v3
uses: actions/setup-go@v4
with:
go-version: 1.21

Expand All @@ -35,11 +35,6 @@ jobs:
- name: typos-action
uses: crate-ci/[email protected]

- name: Lint
run: |
go vet -stdmethods=false $(go list ./...)
go install mvdan.cc/[email protected]
test -z "$(gofumpt -l -extra .)"

- name: Unit Test
run: go test -v -race -covermode=atomic -coverprofile=coverage.out ./...
Expand Down
34 changes: 34 additions & 0 deletions .golangci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Options for analysis running.
run:
# include `vendor` `third_party` `testdata` `examples` `Godeps` `builtin`
skip-dirs-use-default: true
# output configuration options
output:
# Format: colored-line-number|line-number|json|tab|checkstyle|code-climate|junit-xml|github-actions
formats: colored-line-number
# All available settings of specific linters.
# Refer to https://golangci-lint.run/usage/linters
linters-settings:
gofumpt:
# Choose whether to use the extra rules.
# Default: false
extra-rules: true
govet:
# Disable analyzers by name.
# Run `go tool vet help` to see all analyzers.
disable:
- stdmethods
linters:
enable:
- gofumpt
- goimports
- gofmt
disable:
- errcheck
- typecheck
- staticcheck
issues:
exclude-use-default: true
exclude-files:
- ".*\\.mock\\.go$"
exclude-dirs:

0 comments on commit a0ecd79

Please sign in to comment.