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: |