Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP]Chao/action auto swagger #16

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .github/scripts/auto-swagger.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash

{
go install github.com/swaggo/swag/cmd/swag@latest
swag init -g ./cmd/server/main.go
git config user.name devops
git config suer.email [email protected]
git add .
git commit -m "swagger updated"
git push
} || {
set -e
}
6 changes: 5 additions & 1 deletion .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v4
with:
Expand All @@ -21,5 +21,9 @@ jobs:
run: go install golang.org/x/vuln/cmd/govulncheck@latest && govulncheck ./...
- name: Test
run: go test -v ./...
- name: Swagger
run: chmod +x ./.github/scripts/auto-swagger.sh && ./.github/scripts/auto-swagger.sh



name: Building And Testing
Loading