-
Notifications
You must be signed in to change notification settings - Fork 1
chore: update dependencies, go version, and include testing in CICD #16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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,13 +1,15 @@ | ||
| name: Push in Main | ||
| on: | ||
| push: | ||
| branches: main | ||
| branches: ["main"] | ||
| tags: | ||
| - 'v[0-9]+.[0-9]+.[0-9]+' | ||
| - "v[0-9]+.[0-9]+.[0-9]+" | ||
|
|
||
| jobs: | ||
| lint: | ||
| uses: ./.github/workflows/golangci-lint.yml | ||
| test: | ||
| uses: ./.github/workflows/test.yml | ||
| build: | ||
| uses: ./.github/workflows/build.yml | ||
| needs: lint | ||
| needs: [lint, test] |
This file contains hidden or 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,10 @@ | ||
| name: Pull Request Checks | ||
| on: | ||
| pull_request: | ||
| branches: ["main"] | ||
|
|
||
| jobs: | ||
| lint: | ||
| uses: ./.github/workflows/golangci-lint.yml | ||
| test: | ||
| uses: ./.github/workflows/test.yml |
This file contains hidden or 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,23 @@ | ||
| name: Go Tests | ||
| on: workflow_call | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| test: | ||
| name: test | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v5 | ||
|
|
||
| - name: Set up Go | ||
| uses: actions/setup-go@v5 | ||
| with: | ||
| go-version-file: go.mod | ||
|
|
||
| # - name: Download dependencies | ||
| # run: go mod download | ||
|
|
||
| - name: Run tests | ||
| uses: robherley/go-test-action@v0 |
This file contains hidden or 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,43 +1,58 @@ | ||
| version: "2" | ||
| linters: | ||
| enable: | ||
| # enabled by default | ||
| - errcheck # Errcheck is a program for checking for unchecked errors in Go code. These unchecked errors can be critical bugs in some cases. | ||
| - gosimple # Linter for Go source code that specializes in simplifying code. | ||
| - govet # Vet examines Go source code and reports suspicious constructs. It is roughly the same as 'go vet' and uses its passes. | ||
| - ineffassign # Detects when assignments to existing variables are not used. | ||
| - staticcheck # It's a set of rules from staticcheck. It's not the same thing as the staticcheck binary. | ||
| - unused # Checks Go code for unused constants, variables, functions and types. | ||
| # additional | ||
| - goimports # Check import statements are formatted according to the 'goimport' command. Reformat imports in autofix mode. | ||
| - misspell # Finds commonly misspelled English words. | ||
| - sloglint # Ensure consistent code style when using log/slog. | ||
| - godox # Tool for detection of FIXME, TODO and other comment keywords. | ||
| - funlen # Tool for detection of long functions. | ||
| - gocognit # Computes and checks the cognitive complexity of functions. | ||
| linters-settings: | ||
| sloglint: | ||
| no-mixed-args: true | ||
| kv-only: true | ||
| attr-only: false | ||
| no-global: "" | ||
| context: "scope" | ||
| static-msg: true | ||
| no-raw-keys: false | ||
| key-naming-case: camel | ||
| forbidden-keys: | ||
| - time | ||
| - level | ||
| - msg | ||
| - source | ||
| args-on-sep-lines: false | ||
| godox: | ||
| keywords: | ||
| - TODO | ||
| - BUG | ||
| - FIXME | ||
| funlen: | ||
| lines: 60 | ||
| statements: 40 | ||
| ignore-comments: false | ||
| gocognit: | ||
| min-complexity: 20 | ||
| settings: | ||
| funlen: | ||
| lines: 60 | ||
| statements: 40 | ||
| ignore-comments: false | ||
| gocognit: | ||
| min-complexity: 20 | ||
| godox: | ||
| keywords: | ||
| - TODO | ||
| - BUG | ||
| - FIXME | ||
| sloglint: | ||
| no-mixed-args: true | ||
| kv-only: true | ||
| attr-only: false | ||
| no-global: "" | ||
| context: scope | ||
| static-msg: true | ||
| no-raw-keys: false | ||
| key-naming-case: camel | ||
| forbidden-keys: | ||
| - time | ||
| - level | ||
| - msg | ||
| - source | ||
| args-on-sep-lines: false | ||
| exclusions: | ||
| generated: lax | ||
| presets: | ||
| - comments | ||
| - common-false-positives | ||
| - legacy | ||
| - std-error-handling | ||
| formatters: | ||
| enable: | ||
| - goimports | ||
Stogas marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| exclusions: | ||
| generated: lax | ||
| paths: | ||
| - third_party$ | ||
| - builtin$ | ||
| - examples$ | ||
This file contains hidden or 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,4 +1,4 @@ | ||
| FROM golang:1.22.5-alpine AS build-stage | ||
| FROM golang:1.25.2-alpine AS build-stage | ||
|
|
||
| WORKDIR /app | ||
|
|
||
|
|
||
This file contains hidden or 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 hidden or 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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.