-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(client): keep ref to resp to avoid conn closed
- Loading branch information
Showing
8 changed files
with
59 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,36 @@ | ||
name: Pull Request Check | ||
|
||
on: [pull_request] | ||
on: [ pull_request ] | ||
|
||
jobs: | ||
compliant: | ||
runs-on: self-hosted | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Check License Header | ||
uses: apache/skywalking-eyes@header@v0.4.0 | ||
uses: apache/skywalking-eyes/header@v0.4.0 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: typos-action | ||
- name: Check Spell | ||
uses: crate-ci/typos@master | ||
|
||
staticcheck: | ||
runs-on: self-hosted | ||
golangci-lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: actions/checkout@v4 | ||
- name: Set up Go | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: 1.16 | ||
|
||
- uses: actions/cache@v3 | ||
uses: actions/setup-go@v5 | ||
with: | ||
path: ~/go/pkg/mod | ||
key: reviewdog-${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | ||
restore-keys: | | ||
reviewdog-${{ runner.os }}-go- | ||
- uses: reviewdog/action-staticcheck@v1 | ||
go-version: stable | ||
# for self-hosted, the cache path is shared across projects | ||
# and it works well without the cache of github actions | ||
# Enable it if we're going to use Github only | ||
cache: true | ||
|
||
- name: Golangci Lint | ||
# https://golangci-lint.run/ | ||
uses: golangci/golangci-lint-action@v6 | ||
with: | ||
github_token: ${{ secrets.github_token }} | ||
# Change reviewdog reporter if you need [github-pr-check,github-check,github-pr-review]. | ||
reporter: github-pr-review | ||
# Report all results. | ||
filter_mode: nofilter | ||
# Exit with 1 when it find at least one finding. | ||
fail_on_error: true | ||
# Set staticcheck flags | ||
staticcheck_flags: -checks=inherit,-SA1029,-SA6002 | ||
version: latest |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,31 @@ | ||
name: Tests | ||
|
||
on: [push, pull_request] | ||
on: [ push, pull_request ] | ||
|
||
jobs: | ||
lint-and-ut: | ||
runs-on: self-hosted | ||
benchmark: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: actions/checkout@v4 | ||
- name: Set up Go | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: 1.18 | ||
|
||
- uses: actions/cache@v3 | ||
uses: actions/setup-go@v5 | ||
with: | ||
path: ~/go/pkg/mod | ||
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | ||
restore-keys: | | ||
${{ runner.os }}-go- | ||
go-version: stable | ||
|
||
- name: Lint | ||
run: | | ||
go vet -stdmethods=false $(go list ./...) | ||
go install mvdan.cc/gofumpt@v0.2.0 | ||
test -z "$(gofumpt -l -extra .)" | ||
- name: Benchmark | ||
run: go test -bench=. -benchmem ./... | ||
|
||
uinttest: | ||
strategy: | ||
matrix: | ||
go: [ "1.18", "1.19", "1.20", "1.21", "1.22", "1.23" ] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: ${{ matrix.go }} | ||
cache: true # set false for self-hosted | ||
- name: Unit Test | ||
run: go test -race -covermode=atomic -coverprofile=coverage.out ./... | ||
run: go test -race ./... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
linters: # https://golangci-lint.run/usage/linters/ | ||
disable-all: true | ||
enable: | ||
# - errcheck # can not skip _test.go ? | ||
- gosimple | ||
- govet | ||
- ineffassign | ||
- staticcheck | ||
- unused | ||
- unconvert |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters