forked from apache/cloudstack-kubernetes-provider
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Farnaz Babaeian
committed
Jan 30, 2025
1 parent
08e0687
commit 54079d2
Showing
8 changed files
with
135 additions
and
28 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,50 @@ | ||
name: PR Check | ||
|
||
on: | ||
pull_request: {} | ||
|
||
jobs: | ||
lint: | ||
name: Lint | ||
runs-on: ubuntu-24.04 | ||
steps: | ||
- name: Setup up Go 1.23 | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: "1.23" | ||
- name: Check out code | ||
uses: actions/checkout@v4 | ||
- name: golangci-lint | ||
uses: golangci/golangci-lint-action@v6 | ||
with: | ||
version: v1.63.4 | ||
args: --timeout=5m | ||
|
||
build: | ||
name: Test & Build | ||
runs-on: ubuntu-24.04 | ||
steps: | ||
- name: Setup up Go 1.23 | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: "1.23" | ||
|
||
- name: Check out code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Cache | ||
uses: actions/cache@v4 | ||
with: | ||
path: ~/go/pkg/mod | ||
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | ||
restore-keys: | | ||
${{ runner.os }}-go- | ||
- name: Run unit tests | ||
run: make test | ||
|
||
- name: Run sanity tests | ||
run: make test-sanity | ||
|
||
- name: Build | ||
run: make |
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,47 @@ | ||
issues: | ||
exclude-use-default: true | ||
max-issues-per-linter: 50 | ||
max-same-issues: 0 # disable | ||
exclude-rules: | ||
- path: _test.go | ||
linters: | ||
- funlen | ||
- nestif | ||
|
||
linters-settings: | ||
gci: | ||
sections: | ||
- standard | ||
- default | ||
- prefix(github.com/leaseweb/cloudstack-csi-driver) | ||
goimports: | ||
local-prefixes: github.com/leaseweb/cloudstack-csi-driver | ||
|
||
misspell: | ||
locale: US | ||
|
||
linters: | ||
enable-all: true | ||
disable: | ||
- execinquery | ||
- cyclop | ||
- depguard | ||
- err113 | ||
- exhaustruct | ||
- funlen | ||
- gochecknoglobals | ||
- gomnd | ||
- inamedparam | ||
- ireturn | ||
- lll | ||
- mnd | ||
- paralleltest | ||
- tagliatelle | ||
- testpackage | ||
- varnamelen | ||
- wrapcheck | ||
- wsl | ||
- execinquery | ||
- gomnd | ||
# Todo remove nestedif | ||
- nestif |
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