-
Notifications
You must be signed in to change notification settings - Fork 120
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
Added test & build to makefile #248
Conversation
@el10savio Thank you 😃 |
Makefile
Outdated
|
||
test: check | ||
|
||
build: go build -o /bin/chaoskube -v |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you intentionally use the global /bin
instead of a local (relative) path?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point, I can change it to be relative to the project root
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's do that. Otherwise it might have unintended effects.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've changed it to generate the build in a bin folder located in the project root
Added it to .gitignore so that local builds are not picked up by git
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$ ~/chaoskube tree -L 2
.
├── CHANGELOG.md
├── Dockerfile
├── Dockerfile.arm32v6
├── Dockerfile.arm64v8
├── Dockerfile.ppc64le
├── LICENSE
├── Makefile
├── README.md
├── bin
│ └── chaoskube <--- here
├── chaoskube
│ ├── chaoskube.go
│ └── chaoskube_test.go
├── chaoskube.png
├── examples
│ ├── chaoskube.yaml
│ └── rbac.yaml
├── go.mod
├── go.sum
├── internal
│ └── testutil
├── main.go
├── metrics
│ └── metrics.go
├── notifier
│ ├── noop.go
│ ├── notifier.go
│ ├── notifier_test.go
│ ├── slack.go
│ └── slack_test.go
├── renovate.json
├── terminator
│ ├── delete_pod.go
│ ├── delete_pod_test.go
│ └── terminator.go
└── util
├── util.go
└── util_test.go
9 directories, 29 files
@el10savio Awesome. Thank you! |
References: #146
Added
make test
&make build
test - Since check is already added, test redirects and runs
make check
build - added
make build
to rungo build
and generate the binary inbin/chaoskube