-
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
jnbdz
committed
Mar 13, 2024
1 parent
1b7a9d7
commit ff71f8d
Showing
2 changed files
with
53 additions
and
0 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,33 @@ | ||
name: Go | ||
|
||
on: | ||
push: | ||
branches: [ master, develop ] | ||
pull_request: | ||
branches: [ master ] | ||
|
||
jobs: | ||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set up Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: '1.22' # Use the Go version of your project | ||
- name: Check out code | ||
uses: actions/checkout@v2 | ||
- name: Cache Go modules | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/go/pkg/mod | ||
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | ||
restore-keys: | | ||
${{ runner.os }}-go- | ||
- name: Install golangci-lint | ||
uses: golangci/golangci-lint-action@v2 | ||
with: | ||
version: v1.56.2 # Use the version of golangci-lint you want | ||
args: --config .golangci.yml ./... # Optional: specify config file and directories to lint | ||
- name: Run Tests | ||
run: go test -v ./... |
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,20 @@ | ||
linters-settings: | ||
govet: | ||
check-shadowing: true | ||
golint: | ||
min-confidence: 0.8 | ||
|
||
linters: | ||
enable: | ||
- govet | ||
- golint | ||
- gofmt | ||
- goimports | ||
disable: | ||
- errcheck | ||
|
||
issues: | ||
exclude-rules: | ||
- linters: | ||
- golint | ||
text: "should have comment or be unexported" # Example: exclude a specific rule |