-
Notifications
You must be signed in to change notification settings - Fork 31
Expand file tree
/
Copy pathMakefile
More file actions
43 lines (32 loc) · 939 Bytes
/
Makefile
File metadata and controls
43 lines (32 loc) · 939 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
SHELL=/usr/bin/env bash
.SHELLFLAGS=-o pipefail -ec
.DEFAULT_GOAL := test
.PHONY: build
build:
go build -o poutine .
ci: fmt test lint
test:
go test ./... -cover
fmt:
go fmt ./...
lint:
golangci-lint run
.PHONY: lint-branch
lint-branch:
golangci-lint run --new-from-merge-base main
.PHONY: snapshot
snapshot:
go test -v -run TestSnapshot -timeout 10m ./test/snapshot/
.PHONY: update-snapshots
update-snapshots:
UPDATE_SNAPS=true go test -v -run TestSnapshot -timeout 10m ./test/snapshot/
.PHONY: update-vulndb
update-vulndb:
go test -tags build_platform_vuln_database -run TestPopulateBuildPlatformVulnDatabase -timeout 10m ./opa/
opa fmt -w opa/rego/external/build_platform.rego
.PHONY: bench-org
bench-org:
go test -bench=BenchmarkAnalyzeOrg -benchtime=1x -count=3 -timeout=30m ./bench/analyze/
.PHONY: bench-repo
bench-repo:
go test -bench=BenchmarkAnalyzeRepo -benchtime=1x -count=3 -timeout=10m ./bench/analyze/