-
Notifications
You must be signed in to change notification settings - Fork 832
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #616 from cloudwego/release/v0.4.0
chore: release v0.4.0
- Loading branch information
Showing
212 changed files
with
8,225 additions
and
2,991 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
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,74 +1,63 @@ | ||
name: Tests | ||
|
||
on: [push, pull_request] | ||
on: [ push, pull_request ] | ||
|
||
jobs: | ||
lint-and-ut: | ||
runs-on: self-hosted | ||
unit-benchmark-test: | ||
strategy: | ||
matrix: | ||
go: [ 1.17, 1.18, 1.19 ] | ||
os: [ X64, ARM64 ] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: 1.18 | ||
go-version: ${{ matrix.go }} | ||
|
||
- uses: actions/cache@v3 | ||
with: | ||
path: ~/go/pkg/mod | ||
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | ||
restore-keys: | | ||
${{ runner.os }}-go- | ||
- name: Lint | ||
run: | | ||
go vet -stdmethods=false $(go list ./...) | ||
go install mvdan.cc/[email protected] | ||
test -z "$(gofumpt -l -extra .)" | ||
# block scenario, comment temporarily | ||
# - uses: actions/cache@v3 | ||
# with: | ||
# path: ~/go/pkg/mod | ||
# key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | ||
# restore-keys: | | ||
# ${{ runner.os }}-go- | ||
|
||
- name: Unit Test | ||
run: go test -race -covermode=atomic -coverprofile=coverage.out ./... | ||
|
||
benchmark: | ||
runs-on: self-hosted | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: 1.18 | ||
|
||
- uses: actions/cache@v3 | ||
with: | ||
path: ~/go/pkg/mod | ||
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | ||
restore-keys: | | ||
${{ runner.os }}-go- | ||
- name: Benchmark | ||
run: go test -bench=. -benchmem -run=none ./... | ||
|
||
scenario: | ||
runs-on: self-hosted | ||
scenario-test: | ||
strategy: | ||
matrix: | ||
go: [ 1.17, 1.18 ] | ||
runs-on: [ self-hosted, X64 ] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: actions/setup-python@v3 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.x' | ||
architecture: x64 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: 1.18 | ||
go-version: ${{ matrix.go }} | ||
|
||
- uses: actions/cache@v3 | ||
with: | ||
path: ~/go/pkg/mod | ||
key: scenario-${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | ||
restore-keys: | | ||
scenario-${{ runner.os }}-go- | ||
${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | ||
${{ runner.os }}-go- | ||
# block scenario, comment temporarily | ||
# - uses: actions/cache@v3 | ||
# with: | ||
# path: ~/go/pkg/mod | ||
# key: scenario-${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | ||
# restore-keys: | | ||
# scenario-${{ runner.os }}-go- | ||
# ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | ||
# ${{ runner.os }}-go- | ||
|
||
- name: Scenario Tests | ||
run: | | ||
|
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,41 @@ | ||
# Options for analysis running. | ||
run: | ||
# include `vendor` `third_party` `testdata` `examples` `Godeps` `builtin` | ||
skip-dirs-use-default: true | ||
skip-dirs: | ||
- kitex_gen | ||
skip-files: | ||
- ".*\\.mock\\.go$" | ||
# output configuration options | ||
output: | ||
# Format: colored-line-number|line-number|json|tab|checkstyle|code-climate|junit-xml|github-actions | ||
format: 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 | ||
goimports: | ||
# Put imports beginning with prefix after 3rd-party packages. | ||
# It's a comma-separated list of prefixes. | ||
local-prefixes: github.com/cloudwego/kitex | ||
govet: | ||
# Disable analyzers by name. | ||
# Run `go tool vet help` to see all analyzers. | ||
disable: | ||
- stdmethods | ||
linters: | ||
enable: | ||
- gofumpt | ||
- goimports | ||
- gofmt | ||
disable: | ||
- errcheck | ||
- typecheck | ||
- deadcode | ||
- varcheck | ||
- staticcheck | ||
issues: | ||
exclude-use-default: true |
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
Oops, something went wrong.