1
1
SRCS := $(filter-out % _test.go, $(wildcard * .go cmd/actionlint/* .go) ) go.mod go.sum
2
2
TESTS := $(filter % _test.go, $(wildcard * .go) )
3
- TOOL := $(wildcard scripts/* /* .go)
4
- TESTDATA := $(wildcard testdata/examples/* testdata/err/* testdata/ok/* )
5
- GOTEST := $(shell command -v gotest 2>/dev/null)
3
+ TOOL := $(filter % _test.go, $(wildcard scripts/* /* .go) )
4
+ TESTDATA := $(wildcard \
5
+ testdata/examples/* \
6
+ testdata/err/* \
7
+ testdata/ok/* \
8
+ testdata/config/* \
9
+ testdata/format/* \
10
+ testdata/projects/* \
11
+ testdata/reusable_workflow_metadata/* \
12
+ )
6
13
7
14
all : clean build test
8
15
9
16
.testtimestamp : $(TESTS ) $(SRCS ) $(TESTDATA ) $(TOOL )
10
17
go test ./...
11
18
touch .testtimestamp
12
19
13
- test : .testtimestamp
20
+ t test : .testtimestamp
14
21
15
22
.staticchecktimestamp : $(TESTS ) $(SRCS ) $(TOOL )
16
23
staticcheck ./...
17
24
GOOS=js GOARCH=wasm staticcheck ./playground
18
25
touch .staticchecktimestamp
19
26
20
- lint : .staticchecktimestamp
27
+ l lint : .staticchecktimestamp
21
28
22
29
popular_actions.go all_webhooks.go availability.go : scripts/generate-popular-actions/main.go scripts/generate-webhook-events/main.go scripts/generate-availability/main.go
23
30
ifdef SKIP_GO_GENERATE
29
36
actionlint : $(SRCS ) popular_actions.go all_webhooks.go
30
37
CGO_ENABLED=0 go build ./cmd/actionlint
31
38
32
- build : actionlint
39
+ b build : actionlint
33
40
34
41
actionlint_fuzz-fuzz.zip :
35
42
go-fuzz-build ./fuzz
@@ -55,13 +62,8 @@ scripts/generate-actionlint-matcher/test/no_escape.txt: actionlint
55
62
scripts/generate-actionlint-matcher/test/want.json : actionlint
56
63
./actionlint -format ' {{json .}}' ./testdata/err/one_error.yaml > scripts/generate-actionlint-matcher/test/want.json || true
57
64
58
- clean :
65
+ c clean :
59
66
rm -f ./actionlint ./.testtimestamp ./.staticchecktimestamp ./actionlint_fuzz-fuzz.zip ./man/actionlint.1 ./man/actionlint.1.html ./actionlint-workflow-ast
60
67
rm -rf ./corpus ./crashers
61
68
62
- b : build
63
- t : test
64
- c : clean
65
- l : lint
66
-
67
69
.PHONY : all test clean build lint fuzz man bench b t c l
0 commit comments