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

adjusting makefile - in progress #143

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions Dockerfile.hot.dev

This file was deleted.

19 changes: 15 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,34 @@ SRC = $(shell find . -type f -name '*.go' -not -path "./vendor/*")

.PHONY: fmt run

# Format go files in repo
fmt:
@gofmt -l -w $(SRC)

# Runs the api service without the database dependency that should be run from the askdarcel-api project
run:
docker compose -f docker-compose.dev.yml build && docker compose -f docker-compose.dev.yml up

hot-run:
env CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o ./tmp/sheltertech-go-hot ./cmd/sheltertech-go && DOCKER_DEFAULT_PLATFORM="linux/amd64" docker compose -f docker-compose.hot.dev.yml build && docker compose -f docker-compose.hot.dev.yml up

# Used in CI to start a database in the background along with the api service
# Running this yourself allows you to create what happens in CI
ci-run:
docker compose -f docker-compose.ci.yml build && docker compose -f docker-compose.ci.yml up -d

# Not strictly used by anything but allows a compile check
build:
go build -v ./...

# No dependencies
test:
go test -v ./...

# Assumes you have a database running from either the askdarcel-api project or you use `make ci-run`
integration-test:
go test -v -tags=integration ./...
go test -v -tags=integration ./...

# TODO add a unit test build that will run within a container so Go does not need to exist on host
Copy link
Member Author

Choose a reason for hiding this comment

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

Actually I think adding these is silly since if you must, you can go into the container and run make test or make integration-test

test-docker:
echo "TODO"
# TODO add a ingregation test build that will run within a container so Go does not need to exist on host
test-integration-test-docker:
echo "TODO"
25 changes: 0 additions & 25 deletions docker-compose.hot.dev.yml

This file was deleted.

Loading