forked from fastenhealth/fasten-onprem
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
53 lines (42 loc) · 1.95 KB
/
Makefile
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
.ONESHELL: # Applies to every targets in the file! .ONESHELL instructs make to invoke a single instance of the shell and provide it with the entire recipe, regardless of how many lines it contains.
.SHELLFLAGS = -ec
########################################################################################################################
# General
########################################################################################################################
.PHONY: test
test: backend-test frontend-test
########################################################################################################################
# Backend
########################################################################################################################
.PHONY: backend-clean
backend-clean:
go clean
.PHONY: backend-dep
backend-dep:
go mod vendor
.PHONY: backend-test
backend-test: backend-dep
go vet ./...
go test -v ./...
.PHONY: backend-test-coverage
backend-test-coverage: backend-dep
go test -coverprofile=backend-coverage.txt -covermode=atomic -v ./...
########################################################################################################################
# Frontend
########################################################################################################################
.PHONY: frontend-dep
frontend-dep:
cd frontend
yarn install --frozen-lockfile
.PHONY: frontend-test
# reduce logging, disable angular-cli analytics for ci environment
frontend-test: frontend-dep
cd frontend && npx ng test --watch=false
.PHONY: frontend-test-coverage
# reduce logging, disable angular-cli analytics for ci environment
frontend-test-coverage: frontend-dep
cd frontend && npx ng test --watch=false --code-coverage
.PHONY: frontend-test-coverage-ci
# reduce logging, disable angular-cli analytics for ci environment
frontend-test-coverage-ci: frontend-dep
cd frontend && npx ng test --watch=false --code-coverage --browsers=ChromeHeadlessCI