-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
39 lines (38 loc) · 1.27 KB
/
Copy pathMakefile
File metadata and controls
39 lines (38 loc) · 1.27 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
39
SHELL := /usr/bin/env bash
.PHONY: bootstrap generate check-generated check-fdg-v2 test-unit test-integration test-e2e test-mock-e2e build dev mock check
bootstrap:
go mod download
go -C tools/openapi mod download
npm --prefix web ci
generate:
go -C tools/openapi tool ogen --target ../../internal/api/generated --package generated ../../openapi/openapi.yaml
npm --prefix web run generate
check-generated:
./scripts/check-generated.sh
check-fdg-v2:
./scripts/check-fdg-v2.sh
test-unit:
go test ./...
npm --prefix web test
test-integration:
./scripts/with-dex.sh go test -tags=integration ./...
test-e2e:
./scripts/with-dex.sh ./scripts/run-e2e.sh
test-mock-e2e:
./scripts/run-mock-e2e.sh
build:
npm --prefix web run build
go build -o bin/basic-process ./cmd/server
dev:
./scripts/with-dex.sh bash -c 'npm --prefix web run build && go run ./cmd/server'
mock:
./scripts/with-mock.sh
check: bootstrap check-generated check-fdg-v2
@test -z "$$(gofmt -l $$(find . -name '*.go' -not -path './.agents/*' -not -path './upstream-dex/*'))" || { gofmt -d $$(gofmt -l $$(find . -name '*.go' -not -path './.agents/*' -not -path './upstream-dex/*')); exit 1; }
go mod tidy -diff
go vet ./...
$(MAKE) test-unit
$(MAKE) test-integration
$(MAKE) test-e2e
$(MAKE) test-mock-e2e
$(MAKE) build