This action installs swag tool to generate/test your golang application
- Installing swag tool (by default)
- Executing swag tool with your parameters. Can generate swagger documentation
- Comparing generated documentation with commited. Works only for generated
docs.go
files
Required The version of swag tool you want to install. Version is taken from swag releases.
Command you want to execute. Command is passed as arguments to swag tool.
Specifies a path to docs.go
file you want to compare with your commited docs.go file. Commited file is specified by equalToGoOriginPath
parameter.
Specifies a path to docs.go file commited in the repository. Works only if equalToGoPath
option is specified. Default is docs/docs.go
.
We want to generate docs.go file and compare with commited.
It's an example from current repository. Go project is taken from https://github.com/swaggo/swag/tree/master/example/celler
- uses: yegorrybchenko/[email protected]
with:
command: init -d example_test -ot go
swagWersion: 1.8.1
equalToGoPath: docs/docs.go
equalToGoOriginPath: example_test/docs/docs.go
- Fork the repository
- Create new branch
- Commit to the new branch
- Create new pull request
Run build-package before the push
npm run build-package