-
Notifications
You must be signed in to change notification settings - Fork 470
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: updated the latest conf and use supported Go versions
- Loading branch information
Showing
35 changed files
with
304 additions
and
299 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 |
---|---|---|
|
@@ -6,47 +6,60 @@ jobs: | |
compatibility-test: | ||
strategy: | ||
matrix: | ||
go: [ 1.15, 1.22 ] | ||
# - "ubuntu-latest" is for Linux with X64 CPU, hosted by GitHub, | ||
# fewer CPUs but high speed international network | ||
# - "ARM64" is for Linux with ARM64 CPU, hosted by bytedance, | ||
# more CPUs but inside CN internet which may download go cache slowly. | ||
# GitHub don't have free runner with ARM CPU. | ||
os: [ ubuntu-latest, ARM64 ] | ||
go: [ 1.18, 1.23 ] | ||
os: [ X64, ARM64 ] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: ${{ matrix.go }} | ||
cache: false | ||
- name: Unit Test | ||
run: go test -timeout=2m -v -race -covermode=atomic -coverprofile=coverage.out ./... | ||
- name: Benchmark | ||
run: go test -bench=. -benchmem -run=none ./... | ||
|
||
windows-test: | ||
runs-on: windows-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: 1.22 | ||
go-version: stable | ||
- name: Build Test | ||
run: go vet -v ./... | ||
style-test: | ||
|
||
compliant: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: 1.16 | ||
|
||
- name: Check License Header | ||
uses: apache/skywalking-eyes/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Lint | ||
run: | | ||
test -z "$(gofmt -s -l .)" | ||
go vet -stdmethods=false $(go list ./...) | ||
|
||
- name: Check Spell | ||
uses: crate-ci/[email protected] | ||
|
||
golangci-lint: | ||
runs-on: [ self-hosted, X64 ] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
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: false | ||
|
||
- name: Golangci Lint | ||
# https://golangci-lint.run/ | ||
uses: golangci/golangci-lint-action@v6 | ||
with: | ||
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 |
---|---|---|
@@ -0,0 +1,32 @@ | ||
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
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.