Skip to content

chore: update go versions #258

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Jul 22, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 22 additions & 16 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,16 @@ jobs:
fail-fast: false
matrix:
go:
- "1.20"
- "1.21"
- '1.22'
- '1.23'
- '1.24'
name: run tests with go version ${{ matrix.go }}
steps:
- name: install go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
go-version: '${{ matrix.go }}'
check-latest: true

- name: checkout code
uses: actions/checkout@v4
Expand All @@ -29,26 +31,30 @@ jobs:
run: make build

- name: Test
env:
COVERALLS_TOKEN: ${{ secrets.COVERALLS_TOKEN }}
run: |
make cover

- name: Coveralls
if: (matrix.go == '1.21')
env:
COVERALLS_TOKEN: ${{ secrets.COVERALLS_TOKEN }}
run: |
if [[ -n "$COVERALLS_TOKEN" ]]; then
make coveralls
fi

- name: Send coverage
uses: shogo82148/actions-goveralls@v1
with:
path-to-profile: coverage.out
flag-name: Go-${{ matrix.go }}
parallel: true

- name: Upload coverage
if: (matrix.go == '1.21')
uses: actions/upload-artifact@v4
with:
name: coverage
name: coverage.${{ matrix.go }}
path: coverage.*

- name: Assert no changes
run: make assert-no-changes

# notifies that all test jobs are finished.
finish:
needs: build
runs-on: ubuntu-latest
steps:
- uses: shogo82148/actions-goveralls@v1
with:
parallel-finished: true
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ">=1.20.2"
go-version: ">=1.23.2"
- name: Ensure Go
run: go version

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ">=1.20.2"
go-version: ">=1.23.2"
- name: Ensure Go
run: go version

Expand Down
6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
/bin
/coverage
vendor/
coverage.out
coverage.html
coverage.*

dist/
.idea/
.idea/
.DS_Store
12 changes: 6 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ COVERAGEDIR= coverage
SERVICE=local

ifdef GITHUB_ACTIONS
SERVICE=github-actions
SERVICE=github
endif

DATE := $(shell date -u '+%FT%T%z')
Expand Down Expand Up @@ -99,23 +99,23 @@ bin/goveralls: go.sum
$(call goinstall,github.com/mattn/goveralls)

# snapshots: snapshots_1.17
snapshots: snapshots_1.21
snapshots: snapshots_1.24

snapshots_%: clean
echo "##### updating snapshots for golang $* #####"
docker run -i -t -w /app -v $(shell pwd):/app --entrypoint /bin/sh golang:$* -c './update-snapshots.sh || true'

.PHONY: ci
ci: docker_1.20
ci: docker_1.21
ci: docker_1.23
ci: docker_1.24

docker_%:
echo "##### testing golang $* #####"
docker run -i -t -w /app -v $(shell pwd):/app --entrypoint /bin/sh golang:$* -c 'make clean && make'

.PHONY: pullimages
pullimages: pullimage_1.20
pullimages: pullimage_1.21
pullimages: pullimage_1.23
pullimages: pullimage_1.24

pullimage_%:
docker pull golang:$*
Expand Down
Loading
Loading