To run the tests, run the following command:
go test ./...or use the make command:
make testTo run the tests with verbose output, run the following command:
go test -v ./...To run a specific test suite, run the following command:
go test -v ./test_suite.goTo run a specific test, run the following command:
go test -v ./test_suite.go -run TestNameTo run Hide locally, run the following command:
go run ./cmd/hideor use the make command:
make runThis will start a local server at http://127.0.0.1:8080/.
To release a new version of Hide, follow these steps:
-
Create a new release using the GitHub UI or the command line. For example, to create a new release with the command line, run the following command:
gh release create vX.Y.Z --title "Hide vX.Y.Z" --generate-notesReplace
X.Y.Zwith the version number of the new release following the semantic versioning convention.For additional options and for UI instructions, refer to the GitHub documentation.
-
Update the version in the hide brew formula:
-
Copy the URL of the new release (tar.gz file) from the GitHub UI or the command line.
-
Get the SHA256 checksum of the new release (tar.gz file) using the command line:
sha256sum vX.Y.Z.tar.gz
-
Update the
urland thesha256fields in thehide-brew.rbfile to the new release URL and checksum.
The documentation is built using MkDocs. To build the documentation, install MkDocs
pip install mkdocsand then run the following command:
mkdocs buildThe documentation will be built in the site directory.
To serve the documentation locally, run the following command:
mkdocs serveThis will start a local server at http://127.0.0.1:8000/.
The OpenAPI specification is defined in the openapi.yaml file. To run the Swagger Editor and visualize the OpenAPI specification, run the following command:
docker run -p 8081:8080 -v $(pwd):/tmp -e SWAGGER_FILE=/tmp/openapi.yaml swaggerapi/swagger-editorThis will start a local server at http://127.0.0.1:8081/.