From 464d34347a399b840a4f963cc96dfc993ccf8c62 Mon Sep 17 00:00:00 2001 From: Sasha Sobol Date: Wed, 14 Aug 2024 11:50:39 -0700 Subject: [PATCH] update github workflows to test on go 1.23 --- .github/workflows/go.yml | 31 +++++++++++++++++++------------ test.sh | 2 +- 2 files changed, 20 insertions(+), 13 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 08d4d24..5575813 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -2,24 +2,31 @@ name: Go on: push: - branches: [ master ] + branches: [master] pull_request: - branches: [ master ] + branches: [master] jobs: - build: runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + go: + - "1.17" + - "1.20" + - "1.22" + - "1.23" steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - - name: Set up Go - uses: actions/setup-go@v2 - with: - go-version: 1.17 + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version: ${{ matrix.go }} - - name: Build - run: go build -v ./... + - name: Build + run: go build -v ./... - - name: Test - run: go test -v ./... + - name: Test + run: go test -v -bench=. -coverprofile=coverage.txt ./... diff --git a/test.sh b/test.sh index f237424..9c9da85 100755 --- a/test.sh +++ b/test.sh @@ -4,7 +4,7 @@ set -e echo "" > coverage.txt for d in $(go list ./...); do - go test -coverprofile=profile.out -covermode=atomic "$d" + go test -bench=. -coverprofile=profile.out -covermode=atomic "$d" if [ -f profile.out ]; then cat profile.out >> coverage.txt rm profile.out