-
Notifications
You must be signed in to change notification settings - Fork 263
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: add github action and resolve static warning (#777)
* ci: add github action and resolve static warning (#5) * ci: add go check github action (#3) Signed-off-by: xmh1011 <[email protected]> * test: test ci test: test ci Signed-off-by: xmh1011 <[email protected]> * chore: resolve static warning Signed-off-by: xmh1011 <[email protected]> * chore: resolve static warning Signed-off-by: xmh1011 <[email protected]> * chore: resolve static warning Signed-off-by: xmh1011 <[email protected]> * chore: resolve static warning Signed-off-by: xmh1011 <[email protected]> * chore: resolve static warning Signed-off-by: xmh1011 <[email protected]> * chore: resolve static warning Signed-off-by: xmh1011 <[email protected]> * chore: resolve static warning Signed-off-by: xmh1011 <[email protected]> --------- Signed-off-by: xmh1011 <[email protected]> * chore: update go version Signed-off-by: xmh1011 <[email protected]> --------- Signed-off-by: xmh1011 <[email protected]>
- Loading branch information
Showing
26 changed files
with
1,678 additions
and
1,540 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 |
---|---|---|
@@ -0,0 +1,75 @@ | ||
name: Continuous Integration | ||
|
||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
types: [ opened, synchronize, reopened, ready_for_review ] | ||
paths-ignore: | ||
- 'conf/**' | ||
- 'docker/**' | ||
- 'doc/**' | ||
- 'k8s/**' | ||
- 'scripts/**' | ||
- '**.md' | ||
- '.gitignore' | ||
|
||
env: | ||
GO111MODULE: on | ||
GONOSUMDB: "*" | ||
GOSUMDB: off | ||
|
||
jobs: | ||
CommitLint: | ||
name: Commit Lint | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 30 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 100 | ||
- name: Run commitlint | ||
uses: wagoid/commitlint-github-action@v5 | ||
GoLint: | ||
name: "Code Analysis" | ||
needs: CommitLint | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 30 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 1 | ||
- uses: WillAbides/[email protected] | ||
with: | ||
go-version: "1.21" | ||
- name: Run go version check | ||
run: make go-version-check | ||
- name: Run go vet check | ||
run: make go-vet-check | ||
- name: Run golang-ci-lint | ||
uses: golangci/[email protected] | ||
with: | ||
version: v1.53 | ||
args: --timeout=10m --tests=false | ||
only-new-issues: true | ||
skip-pkg-cache: true | ||
skip-build-cache: true | ||
BuildCheck: | ||
name: "Go Build Check" | ||
needs: GoLint | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 30 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 1 | ||
- uses: WillAbides/[email protected] | ||
with: | ||
go-version: "1.21" | ||
- name: go mod tidy | ||
run: make vendor | ||
- name: go build linux | ||
run: make build-linux && make build-linux-arm | ||
- name: go build windows | ||
run: make build-windows | ||
- name: go build mac | ||
run: make build-mac && make build-mac-arm |
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,6 +1,6 @@ | ||
module flashcat.cloud/categraf | ||
|
||
go 1.19 | ||
go 1.21 | ||
|
||
require ( | ||
github.com/Shopify/sarama v1.36.0 | ||
|
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
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.