Add jobs to check go mod and go vet
Generate check / check-changes (pull_request) Successful in 42s
Generate check / verify-generate (pull_request) Skipped
Quality / check-changes (pull_request) Successful in 39s
Quality / check-go-mod-tidy (pull_request) Successful in 50s
Quality / check-go-vet (pull_request) Successful in 1m3s
Quality / run-tests (pull_request) Successful in 1m56s

This commit is contained in:
2026-08-03 09:15:25 +01:00
parent 9bd4230ff1
commit 79513b00fa
3 changed files with 46 additions and 6 deletions
+40 -1
View File
@@ -24,6 +24,45 @@ jobs:
echo "has_go_changes=false" >> $GITHUB_OUTPUT
fi
check-go-mod-tidy:
runs-on: ubuntu-latest
needs: check-changes
if: needs.check-changes.outputs.has_go_changes == 'true'
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: 1.26
- name: Check tidyness
run: |
go mod tidy
if [ -n "$(git status --porcelain go.mod go.sum)" ]; then
echo "go.mod or go.sum changed after go mod tidy; please run go mod tidy and commit the result" >&2
git diff go.mod go.sum >&2
exit 1
fi
check-go-vet:
runs-on: ubuntu-latest
needs: check-changes
if: needs.check-changes.outputs.has_go_changes == 'true'
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: 1.26
- name: Run go vet
run: go vet ./...
run-tests:
runs-on: ubuntu-latest
needs: check-changes
@@ -35,7 +74,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: 1.25
go-version: 1.26
- name: Run Unit tests
run: |
+4 -3
View File
@@ -1,6 +1,6 @@
module github.com/nmoniz/any2anexoj
go 1.25.3
go 1.26.4
require (
github.com/biter777/countries v1.7.5
@@ -8,17 +8,18 @@ require (
github.com/shopspring/decimal v1.4.0
github.com/spf13/pflag v1.0.10
go.uber.org/mock v0.6.0
golang.org/x/sync v0.18.0
golang.org/x/time v0.14.0
)
require golang.org/x/sync v0.18.0 // indirect
require (
github.com/mattn/go-runewidth v0.0.16 // indirect
github.com/nicksnyder/go-i18n/v2 v2.6.0
github.com/rivo/uniseg v0.4.7 // indirect
golang.org/x/mod v0.27.0 // indirect
golang.org/x/sys v0.35.0 // indirect
golang.org/x/text v0.23.0 // indirect
golang.org/x/text v0.23.0
golang.org/x/tools v0.36.0 // indirect
)
+2 -2
View File
@@ -1,3 +1,5 @@
github.com/BurntSushi/toml v1.5.0 h1:W5quZX/G/csjUnuI8SUYlsHs9M38FC7znL0lIO+DvMg=
github.com/BurntSushi/toml v1.5.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho=
github.com/biter777/countries v1.7.5 h1:MJ+n3+rSxWQdqVJU8eBy9RqcdH6ePPn4PJHocVWUa+Q=
github.com/biter777/countries v1.7.5/go.mod h1:1HSpZ526mYqKJcpT5Ti1kcGQ0L0SrXWIaptUWjFfv2E=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
@@ -29,8 +31,6 @@ golang.org/x/sync v0.18.0 h1:kr88TuHDroi+UVf+0hZnirlk8o8T+4MrK6mr60WkH/I=
golang.org/x/sync v0.18.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI=
golang.org/x/sys v0.35.0 h1:vz1N37gP5bs89s7He8XuIYXpyY0+QlsKmzipCbUtyxI=
golang.org/x/sys v0.35.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
golang.org/x/text v0.22.0 h1:bofq7m3/HAFvbF51jz3Q9wLg3jkvSPuiZu/pD1XwgtM=
golang.org/x/text v0.22.0/go.mod h1:YRoo4H8PVmsu+E3Ou7cqLVH8oXWIHVoX0jqUWALQhfY=
golang.org/x/text v0.23.0 h1:D71I7dUrlY+VX0gQShAThNGHFxZ13dGLBHQLVl1mJlY=
golang.org/x/text v0.23.0/go.mod h1:/BLNzu4aZCJ1+kcD0DNRotWKage4q2rGVAg4o22unh4=
golang.org/x/time v0.14.0 h1:MRx4UaLrDotUKUdCIqzPC48t1Y9hANFKIRpNx+Te8PI=