feat: 增加go mod tidy测试

This commit is contained in:
yokowu
2025-09-05 16:40:37 +08:00
parent 1746c41cc6
commit 660ff373d7
3 changed files with 36 additions and 5 deletions

View File

@@ -45,6 +45,18 @@ jobs:
- name: Download dependencies
run: go mod download
- name: Check go.mod formatting
working-directory: backend
run: |
if ! go mod tidy --diff ; then
echo "::error::go.mod or go.sum is not properly formatted. Please run 'go mod tidy' locally and commit the changes."
exit 1
fi
if ! go mod verify ; then
echo "::error::go.mod or go.sum has unverified dependencies. Please run 'go mod verify' locally and commit the changes."
exit 1
fi
- name: Generate Swagger.json
run: |
touch docs/swagger.json