mirror of
https://github.com/chaitin/MonkeyCode.git
synced 2026-02-02 14:53:55 +08:00
feat: 增加go mod tidy测试
This commit is contained in:
12
.github/workflows/backend-ci-cd.yml
vendored
12
.github/workflows/backend-ci-cd.yml
vendored
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user