Skip to content

Commit

Permalink
ci: test go 1.20 ... 1.23
Browse files Browse the repository at this point in the history
  • Loading branch information
cpunion committed Nov 4, 2024
1 parent e2a4f34 commit f7d02cd
Showing 1 changed file with 25 additions and 20 deletions.
45 changes: 25 additions & 20 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.20'
go-version: '1.23'

- name: Check formatting
run: |
if [ -n "$(go fmt ./...)" ]; then
Expand All @@ -44,27 +44,32 @@ jobs:
os:
- macos-latest
- ubuntu-24.04
go:
- '1.20'
- '1.21'
- '1.22'
- '1.23'
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.23'
- 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 with coverage
run: go test -v -race -coverprofile=coverage.txt -covermode=atomic ./...
- name: Test with coverage
run: go test -v -race -coverprofile=coverage.txt -covermode=atomic ./...

- name: Upload coverage to Codecov
if: matrix.os == 'ubuntu-24.04'
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.txt
flags: unittests
name: codecov-umbrella
fail_ci_if_error: true
- name: Upload coverage to Codecov
if: matrix.os == 'ubuntu-24.04'
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.txt
flags: unittests
name: codecov-umbrella
fail_ci_if_error: true

0 comments on commit f7d02cd

Please sign in to comment.