Skip to content

Commit 054ab7e

Browse files
authored
chore: update go versions (#258)
* chore: update go versions * test: add test coverage * chore: convert generator statements to options * chore: convert to options struct * feat: start support for config file * feat: closer to config based running * tests: increase coverage by testing main function. * tests: improve coverage
1 parent 0979fc7 commit 054ab7e

File tree

11 files changed

+2728
-390
lines changed

11 files changed

+2728
-390
lines changed

.github/workflows/build_and_test.yml

Lines changed: 22 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,16 @@ jobs:
1313
fail-fast: false
1414
matrix:
1515
go:
16-
- "1.20"
17-
- "1.21"
16+
- '1.22'
17+
- '1.23'
18+
- '1.24'
1819
name: run tests with go version ${{ matrix.go }}
1920
steps:
2021
- name: install go
2122
uses: actions/setup-go@v5
2223
with:
23-
go-version: ${{ matrix.go }}
24+
go-version: '${{ matrix.go }}'
25+
check-latest: true
2426

2527
- name: checkout code
2628
uses: actions/checkout@v4
@@ -29,26 +31,30 @@ jobs:
2931
run: make build
3032

3133
- name: Test
32-
env:
33-
COVERALLS_TOKEN: ${{ secrets.COVERALLS_TOKEN }}
3434
run: |
3535
make cover
36-
37-
- name: Coveralls
38-
if: (matrix.go == '1.21')
39-
env:
40-
COVERALLS_TOKEN: ${{ secrets.COVERALLS_TOKEN }}
41-
run: |
42-
if [[ -n "$COVERALLS_TOKEN" ]]; then
43-
make coveralls
44-
fi
36+
37+
- name: Send coverage
38+
uses: shogo82148/actions-goveralls@v1
39+
with:
40+
path-to-profile: coverage.out
41+
flag-name: Go-${{ matrix.go }}
42+
parallel: true
4543

4644
- name: Upload coverage
47-
if: (matrix.go == '1.21')
4845
uses: actions/upload-artifact@v4
4946
with:
50-
name: coverage
47+
name: coverage.${{ matrix.go }}
5148
path: coverage.*
5249

5350
- name: Assert no changes
5451
run: make assert-no-changes
52+
53+
# notifies that all test jobs are finished.
54+
finish:
55+
needs: build
56+
runs-on: ubuntu-latest
57+
steps:
58+
- uses: shogo82148/actions-goveralls@v1
59+
with:
60+
parallel-finished: true

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
- name: Set up Go
1818
uses: actions/setup-go@v5
1919
with:
20-
go-version: ">=1.20.2"
20+
go-version: ">=1.23.2"
2121
- name: Ensure Go
2222
run: go version
2323

.github/workflows/release_check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
- name: Set up Go
1616
uses: actions/setup-go@v5
1717
with:
18-
go-version: ">=1.20.2"
18+
go-version: ">=1.23.2"
1919
- name: Ensure Go
2020
run: go version
2121

.gitignore

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
/bin
1717
/coverage
1818
vendor/
19-
coverage.out
20-
coverage.html
19+
coverage.*
2120

2221
dist/
23-
.idea/
22+
.idea/
23+
.DS_Store

Makefile

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ COVERAGEDIR= coverage
1010
SERVICE=local
1111

1212
ifdef GITHUB_ACTIONS
13-
SERVICE=github-actions
13+
SERVICE=github
1414
endif
1515

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

101101
# snapshots: snapshots_1.17
102-
snapshots: snapshots_1.21
102+
snapshots: snapshots_1.24
103103

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

108108
.PHONY: ci
109-
ci: docker_1.20
110-
ci: docker_1.21
109+
ci: docker_1.23
110+
ci: docker_1.24
111111

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

116116
.PHONY: pullimages
117-
pullimages: pullimage_1.20
118-
pullimages: pullimage_1.21
117+
pullimages: pullimage_1.23
118+
pullimages: pullimage_1.24
119119

120120
pullimage_%:
121121
docker pull golang:$*

0 commit comments

Comments
 (0)