Skip to content

Commit

Permalink
build: update go minimum version to go1.21 for package slices usage
Browse files Browse the repository at this point in the history
  • Loading branch information
jeevatkm committed Sep 26, 2024
1 parent a091b68 commit c6cf259
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 9 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
name: Build
strategy:
matrix:
go: [ 'stable', '1.20.x' ]
go: [ 'stable', '1.21.x' ]
os: [ ubuntu-latest ]

runs-on: ${{ matrix.os }}
Expand All @@ -47,9 +47,12 @@ jobs:
run: diff -u <(echo -n) <(go fmt $(go list ./...))

- name: Test
run: go test ./... -race -coverprofile=coverage.txt -covermode=atomic -coverpkg=./...
run: go test ./... -race -count=1 -coverprofile=coverage.txt -covermode=atomic -coverpkg=./... -shuffle=on

- name: Upload coverage to Codecov
if: ${{ matrix.os == 'ubuntu-latest' && matrix.go == 'stable' }}
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.txt
flags: unittests
11 changes: 7 additions & 4 deletions .github/workflows/label-actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
build:
strategy:
matrix:
go: [ 'stable', '1.20.x' ]
go: [ 'stable', '1.21.x' ]
os: [ ubuntu-latest ]

name: Run Build
Expand All @@ -36,9 +36,12 @@ jobs:
run: diff -u <(echo -n) <(go fmt $(go list ./...))

- name: Test
run: go test ./... -race -coverprofile=coverage.txt -covermode=atomic -coverpkg=./...
run: go test ./... -race -count=1 -coverprofile=coverage.txt -covermode=atomic -coverpkg=./... -shuffle=on

- name: Upload coverage to Codecov
if: ${{ matrix.os == 'ubuntu-latest' && matrix.go == 'stable' }}
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.txt
flags: unittests
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/go-resty/resty/v3

go 1.20
go 1.21

require (
golang.org/x/net v0.27.0
Expand Down

0 comments on commit c6cf259

Please sign in to comment.