-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
38 lines (29 loc) · 1.02 KB
/
Makefile
File metadata and controls
38 lines (29 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
APP_USER_PASSWORD ?= "sourcescore"
SERVER_HOST ?= "localhost"
SUPER_USER_PASSWORD ?= "test_123"
TEST_CLUSTER_NAME = "test-env"
# common env setup
export APP_USER_PASSWORD
export PG_HOST=$(SERVER_HOST)
export SUPER_USER_PASSWORD
codegen:
go mod tidy
go generate ./...
mkdir -p pkg/api
go run github.com/oapi-codegen/oapi-codegen/v2/cmd/oapi-codegen --config=configs/config.yaml api/source-score.yaml
go mod tidy
lint: codegen
go run github.com/golangci/golangci-lint/cmd/golangci-lint run ./...
build: codegen
go build -o ./source-score ./cmd/app
chmod +x ./source-score
unit-tests:
go run github.com/onsi/ginkgo/v2/ginkgo run --skip-package=acceptance --cover --coverprofile=coverage.out ./...
start-containers:
docker compose -f acceptance/compose.yaml up -d
acceptance-tests: start-containers
sleep 20 && cd acceptance && go run github.com/onsi/ginkgo/v2/ginkgo -r ./... && cd -
tests: unit-tests acceptance-tests
cleanup-containers:
docker compose -f acceptance/compose.yaml down -v
docker rmi acceptance-app:latest