-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add tests for documentation and contributing info
- Added tests in CI for testing the documentation changes not committed Closes #14 - Add details for contributing to the project CONTRIBUTING.md Signed-off-by: Kairo Araujo <kairo@kairo.eti.br>
- Loading branch information
1 parent
e887bda
commit a0599c9
Showing
6 changed files
with
68 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,4 @@ bin/ | |
count.out | ||
coverage.out | ||
DoNotUseThisCAPATHTestOnly/ | ||
docs-test/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
## How to contribute to GoCA | ||
|
||
#### **Did you find a bug?** | ||
|
||
* **Ensure the bug was not already reported** by searching on GitHub under [Issues](https://github.com/kairoaraujo/goca/issues). | ||
|
||
* If you're unable to find an open issue addressing the problem, [open a new one](https://github.com/kairoaraujo/goca/issues/new). Be sure to include a **title and clear description**, as much relevant information as possible, and a **code sample** or an **executable test case** demonstrating the expected behavior that is not occurring. | ||
|
||
|
||
#### **Did you write a patch that fixes a bug?** | ||
|
||
* Update the documentation and run tests | ||
|
||
- Update the documentation | ||
|
||
```shell | ||
make docs | ||
``` | ||
|
||
- Run the tests | ||
|
||
```shell | ||
make docs | ||
``` | ||
|
||
* Open a new GitHub pull request with the patch. | ||
|
||
* Ensure the PR description clearly describes the problem and solution. Include the relevant issue number if applicable. | ||
|
||
|
||
#### **Do you intend to add a new feature or change an existing one?** | ||
|
||
* Suggest your change in the opening a [new issue](https://github.com/kairoaraujo/goca/issues/new) to discuss the details. | ||
|
||
|
||
Thanks! :heart: | ||
|
||
GoCA Team |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,21 @@ | ||
lint: | ||
if [ ! -f ./bin/golangci-lint ] ; \ | ||
then \ | ||
curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v1.32.2; \ | ||
fi; | ||
./bin/golangci-lint run -e gosec | ||
.PHONY: test docs docker-image | ||
|
||
test: | ||
go test -covermode=count -coverprofile=count.out -v ./... | ||
go test -covermode=count -coverprofile=count.out -v $(go list ./... | grep -v /docs-test/) | ||
|
||
export PATH=$$PATH:`go env GOPATH`/bin; make -C rest-api test-doc | ||
diff docs-test/swagger.json docs/swagger.json | ||
diff docs-test/swagger.yaml docs/swagger.yaml | ||
|
||
docs: | ||
export PATH=$$PATH:`go env GOPATH`/bin; make -C rest-api doc | ||
|
||
docker-image: | ||
docker build -t goca-rest-api:latest . | ||
|
||
.PHONY: lint test mock | ||
lint: | ||
if [ ! -f ./bin/golangci-lint ] ; \ | ||
then \ | ||
curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v1.49.0; \ | ||
fi; | ||
./bin/golangci-lint run -e gosec |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters