-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathMakefile
More file actions
56 lines (43 loc) · 931 Bytes
/
Makefile
File metadata and controls
56 lines (43 loc) · 931 Bytes
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
54
55
56
REPOSITORY ?= ghcr.io/github/artifact-attestations-opa-provider
TAG ?= dev
IMG := $(REPOSITORY):$(TAG)
CLUSTER = kind
all: aaop
.PHONY: build
build: aaop
.PHONY: aaop
aaop:
go build -o $@ cmd/aaop/$@.go
.PHONY: tidy
tidy:
go mod tidy
.PHONY: lint
lint:
golangci-lint run
.PHONY: test
test:
go test ./... -race
.PHONY: fmt
fmt:
go fmt ./...
.PHONY: docker
docker:
docker build --platform linux/arm64 -t ${IMG} .
.PHONY: docker-arm
docker-arm:
docker build --platform linux/arm64 -t ${IMG_ARM} -f Dockerfile.arm .
.PHONY: kind-load-image-arm
kind-load-image:
kind load docker-image ${IMG} --name ${CLUSTER}
.PHONY: test-rego
test-rego:
cd rego && opa test . -v
.PHONY: integration-test
integration-test:
HOST=localhost ./scripts/gen_certs.sh
./scripts/integration_test.sh
.PHONY: coverage
coverage:
go test -coverprofile=coverage.out ./...
go tool cover -html=coverage.out -o coverage.html
rm coverage.out