Skip to content

Commit

Permalink
chore: Update CI workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
bcessa committed Jan 3, 2024
1 parent 4efd961 commit d44bbad
Show file tree
Hide file tree
Showing 10 changed files with 26 additions and 25 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:

# Go
- name: Set up Go
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: 1.19.x

Expand Down Expand Up @@ -73,7 +73,7 @@ jobs:

# Go
- name: Set up Go
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}

Expand All @@ -82,7 +82,7 @@ jobs:
- name: Static analysis
uses: golangci/golangci-lint-action@v3
with:
version: v1.51.2
version: v1.54.2

# Run unit tests
- name: Test
Expand All @@ -92,7 +92,7 @@ jobs:

# Save artifacts
- name: Save artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: assets
path: |
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -43,7 +43,7 @@ jobs:

# Auto build attempts to build any compiled languages (C/C++, C#, or Java).
- name: Auto build
uses: github/codeql-action/autobuild@v2
uses: github/codeql-action/autobuild@v3

# Run manual build only if auto-build fails
- name: Manual build
Expand All @@ -54,4 +54,4 @@ jobs:
# Run analysis
- name: Perform CodeQL analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3
18 changes: 9 additions & 9 deletions .github/workflows/maintenance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,19 @@ jobs:
name: "close stale issues and pull requests"
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v8
- uses: actions/stale@v9
with:
# On the 'debug' mode the action will not perform any operation.
# Add the secret ACTIONS_STEP_DEBUG with a value of 'true' in the repository.
debug-only: false
repo-token: ${{ secrets.GITHUB_TOKEN }}
days-before-stale: 45
days-before-close: 5
stale-issue-label: 'stale'
stale-pr-label: 'stale'
exempt-issue-labels: 'help wanted,awaiting approval,work in progress'
exempt-pr-labels: 'help wanted,awaiting approval,work in progress'
stale-issue-message: 'This issue has been marked as **stale** because it has not registered any activity during the last 45 days. If the **stale** label is not removed or no activity is registered, this will be automatically closed in 5 days.'
close-issue-message: 'This issue has been closed automatically after not registering any activity for 50 consecutive days.'
stale-pr-message: 'This pull request has been marked as **stale** because it has not registered any activity during the last 45 days. If the **stale** label is not removed or no activity is registered, this will be automatically closed in 5 days.'
close-pr-message: 'This pull request has been closed automatically after not registering any activity for 50 consecutive days.'
stale-issue-label: "stale"
stale-pr-label: "stale"
exempt-issue-labels: "help wanted,awaiting approval,work in progress"
exempt-pr-labels: "help wanted,awaiting approval,work in progress"
stale-issue-message: "This issue has been marked as **stale** because it has not registered any activity during the last 45 days. If the **stale** label is not removed or no activity is registered, this will be automatically closed in 5 days."
close-issue-message: "This issue has been closed automatically after not registering any activity for 50 consecutive days."
stale-pr-message: "This pull request has been marked as **stale** because it has not registered any activity during the last 45 days. If the **stale** label is not removed or no activity is registered, this will be automatically closed in 5 days."
close-pr-message: "This pull request has been closed automatically after not registering any activity for 50 consecutive days."
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:

# Go
- name: Set up Go
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: 1.19.x

Expand Down
4 changes: 3 additions & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ linters:
- typecheck
- gocyclo
- goconst
- depguard
- misspell
- lll
- nakedret
Expand Down Expand Up @@ -55,6 +54,7 @@ linters:
- deadcode
- unused
- dupl
- depguard
# https://github.com/golangci/golangci-lint/issues/2649
- structcheck
- wastedassign
Expand Down Expand Up @@ -96,6 +96,8 @@ linters-settings:
- unusedresult
- tests
#- fieldalignment
nestif:
min-complexity: 6
gofmt:
simplify: true
gocyclo:
Expand Down
1 change: 1 addition & 0 deletions card.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ const (
// CardErrorCode contains the error code value for the card.
type CardErrorCode string

// nolint: gosec
const (
// CardErrorCodeVerificationFailed = "verification_failed".
CardErrorCodeVerificationFailed CardErrorCode = "verification_failed"
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/bryk-io/circle-sdk
go 1.17

require (
github.com/google/uuid v1.3.1
github.com/google/uuid v1.5.0
github.com/stretchr/testify v1.8.4
)

Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ3
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/google/uuid v1.3.1 h1:KjJaJ9iWZ3jOFZIf1Lqf4laDRCasjl0BCmnEGxkdLb4=
github.com/google/uuid v1.3.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/google/uuid v1.5.0 h1:1p67kYwdtXjb0gL0BPiP1Av9wiZPo5A8z2cWkTZ+eyU=
github.com/google/uuid v1.5.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0=
Expand Down
1 change: 1 addition & 0 deletions payment.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ const (
// PaymentErrorCode contains the error code value for the payment.
type PaymentErrorCode string

// nolint: gosec
const (
// PaymentErrorCodePaymentFailed = "payment_failed".
PaymentErrorCodePaymentFailed PaymentErrorCode = "payment_failed"
Expand Down
5 changes: 1 addition & 4 deletions payments/payments.go
Original file line number Diff line number Diff line change
Expand Up @@ -276,10 +276,7 @@ func (mod *API) CapturePayment(
c.IdempotencyKey = req.IdempotencyKey
}
req.Input = &c
if err := mod.cl.Dispatch(req); err != nil {
return err
}
return nil
return mod.cl.Dispatch(req)
}

// CancelPayment the payment will be voided if possible meaning the payment source
Expand Down

0 comments on commit d44bbad

Please sign in to comment.