Skip to content

Commit

Permalink
build: Use Go 1.22 (#909)
Browse files Browse the repository at this point in the history
* build: Use go 1.22

* remove unit test coverage threshold check

* bump goreleaser/goreleaser-action
  • Loading branch information
tianfeng92 authored May 16, 2024
1 parent e008bd0 commit 2357a86
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.21'
go-version: '1.22'
cache: true

# Initializes the CodeQL tools for scanning.
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.21'
go-version: '1.22'

- uses: actions/cache@v3
with:
Expand All @@ -35,7 +35,7 @@ jobs:
${{ runner.os }}-go-
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v3
uses: goreleaser/goreleaser-action@v5
with:
version: latest
args: release --clean
Expand Down
11 changes: 4 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.21'
go-version: '1.22'
cache: true

- name: Checkout
Expand All @@ -41,15 +41,12 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.21'
go-version: '1.22'
cache: true

- name: Run tests
run: |
go test -coverprofile=coverage.txt -covermode=atomic ./...
coverage=$(go tool cover -func=coverage.txt | tail -n 1 | awk '{ print $3 }' | tr -d '%' | cut -d . -f 1)
threshold=40
if [ $coverage -lt $threshold ]; then echo 'Code coverage below threshold!' && exit 1; fi
go test ./...
check-schema:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -86,7 +83,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.21'
go-version: '1.22'
cache: true

- name: Build Project
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build the binary here
FROM golang:1.21 as builder
FROM golang:1.22 as builder

WORKDIR /app

Expand Down
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/saucelabs/saucectl

go 1.21
go 1.22

replace github.com/spf13/viper v1.14.0 => github.com/saucelabs/viper v1.14.0

Expand Down

0 comments on commit 2357a86

Please sign in to comment.