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

make it easier to build the image and run the tests #172

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

tateexon
Copy link

No description provided.

@tateexon
Copy link
Author

@joanlopez broken out from the logging changes

.PHONY: test
test:
go test -v -vet=off -race ./...
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
go test -v -vet=off -race ./...
go test -v -count=1 -vet=off -race ./...

I'd suggest adding -count=1 to prevent caching, and thus make results more reliable at almost no cost (as the suite is pretty fast).

Additionally, could you explain why do we need -vet=off, please?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see it's also on the CI, so perhaps an opportunity to remove it from there? Unless we have a reason to keep it, of course. But I cannot see it and I don't remember any.

.PHONY: build-docker
build-docker:
docker build --build-arg TAG=$(TAG) -t killgrave:$(TAG) .
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't work by default (e.g. make build-docker).

What about defining TAG in the Makefile itself? Like:

REF=$(shell git rev-parse --abbrev-ref HEAD)
HASH=$(shell git rev-parse --short HEAD)
TAG="${REF}-${HASH}"

@@ -1,15 +1,17 @@
FROM golang:1.21-alpine AS build
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes on this file must be reflected on GitHub Workflows. At least, in the release.yml, I think.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants