diff --git a/.github/actions/setup-go/action.yml b/.github/actions/setup-go/action.yml index e01ef74..8ccfb52 100644 --- a/.github/actions/setup-go/action.yml +++ b/.github/actions/setup-go/action.yml @@ -3,22 +3,17 @@ description: | Setup Go inputs: - go-version: - description: Used Go version - default: '1.19' + cache: + description: Cache + required: false + default: "true" runs: using: "composite" steps: - - id: go-version - run: | - echo "Go version is set to ${{ inputs.go-version }}" - echo "GO_VERSION=${{ inputs.go-version }}" >> $GITHUB_ENV - shell: bash - id: go-setup - uses: actions/setup-go@v3 + uses: actions/setup-go@v5 with: - go-version: ${{ env.GO_VERSION }} - - run: | - go mod download - shell: bash + go-version-file: go.mod + check-latest: true + cache: ${{ inputs.cache }} diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index 815fd76..3c5a3cd 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -17,10 +17,10 @@ jobs: contents: read steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install Go uses: ./.github/actions/setup-go - name: Run golangci-lint - uses: golangci/golangci-lint-action@v3 + uses: golangci/golangci-lint-action@v6 with: - version: v1.50.1 + version: v1.62.0 diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 0199f8a..78ef2da 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -16,13 +16,13 @@ jobs: contents: read steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install Go uses: ./.github/actions/setup-go - name: Run Go tests with coverage run: | go test -race -coverprofile=coverage.out -covermode=atomic ./... - name: Upload coverage to Codecov - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v4 with: token: ${{ secrets.CODECOV_TOKEN }} diff --git a/.github/workflows/vuln-scan.yaml b/.github/workflows/vuln-scan.yaml index 3433710..bfadec9 100644 --- a/.github/workflows/vuln-scan.yaml +++ b/.github/workflows/vuln-scan.yaml @@ -16,7 +16,7 @@ jobs: contents: read steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install Go uses: ./.github/actions/setup-go - name: Install govulncheck diff --git a/.golangci.yml b/.golangci.yml index 3aa6506..c352d3f 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -24,7 +24,7 @@ linters: - goconst - gocritic - gofmt - - gomnd + - mnd - gosec - misspell - nilerr diff --git a/CHANGELOG.md b/CHANGELOG.md index af8cf89..04d45d6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,10 @@ How to release a new version: ## [Unreleased] +## [0.2.1] - 2024-11-14 +### Changed +- Updated dependencies. + ## [0.2.0] - 2023-01-06 ### Changed - Type `Duration` is derived directly from the `time.Duration`. @@ -13,6 +17,7 @@ How to release a new version: ### Added - Added Changelog. -[Unreleased]: https://github.com/strvcom/strv-backend-go-time/compare/v0.2.0...HEAD +[Unreleased]: https://github.com/strvcom/strv-backend-go-time/compare/v0.2.1...HEAD +[0.2.1]: https://github.com/strvcom/strv-backend-go-time/compare/v0.2.0...v0.2.1 [0.2.0]: https://github.com/strvcom/strv-backend-go-time/compare/v0.1.0...v0.2.0 [0.1.0]: https://github.com/strvcom/strv-backend-go-time/releases/tag/v0.1.0 diff --git a/go.mod b/go.mod index 33d5f83..c181d3d 100644 --- a/go.mod +++ b/go.mod @@ -1,8 +1,8 @@ module go.strv.io/time -go 1.19 +go 1.23.3 -require github.com/stretchr/testify v1.8.0 +require github.com/stretchr/testify v1.9.0 require ( github.com/davecgh/go-spew v1.1.1 // indirect diff --git a/go.sum b/go.sum index 5164829..60ce688 100644 --- a/go.sum +++ b/go.sum @@ -1,15 +1,10 @@ -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/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= -github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= -github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=