File tree Expand file tree Collapse file tree 2 files changed +13
-21
lines changed Expand file tree Collapse file tree 2 files changed +13
-21
lines changed Original file line number Diff line number Diff line change 1
- name : Tests
1
+ name : Build and Test
2
2
on :
3
3
pull_request :
4
4
paths-ignore :
@@ -14,13 +14,16 @@ permissions:
14
14
contents : read
15
15
pull-requests : read
16
16
jobs :
17
- golangci :
18
- name : lint
17
+ lint :
18
+ name : Lint
19
19
runs-on : ubuntu-latest
20
20
steps :
21
21
- uses : actions/checkout@v2
22
22
with :
23
23
fetch-depth : 2
24
+ - name : terraform fmt
25
+ run : |
26
+ make tflint
24
27
- name : golangci-lint
25
28
uses : golangci/golangci-lint-action@v2
26
29
with :
46
49
uses : actions/checkout@v2
47
50
- name : Setup terraform
48
51
uses : hashicorp/setup-terraform@v1
49
- - name : Terraform fmt
50
- run : |
51
- make tf-check
52
52
- name : Build
53
53
run : |
54
54
make
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ default: build
8
8
terraform-provider-libvirt :
9
9
go build -ldflags " ${LDFLAGS} "
10
10
11
- build : fmt-check lint-check vet-check terraform-provider-libvirt
11
+ build : terraform-provider-libvirt
12
12
13
13
install :
14
14
go install -ldflags " ${LDFLAGS} "
@@ -20,10 +20,6 @@ install:
20
20
test :
21
21
go test -v $(TEST_ARGS_DEF ) $(TEST_ARGS ) ./libvirt
22
22
23
- lint :
24
- golangci-lint run
25
- terraform fmt -write=false -check=true -diff=true examples/
26
-
27
23
# acceptance tests
28
24
# usage:
29
25
#
@@ -39,22 +35,18 @@ lint:
39
35
testacc :
40
36
./travis/run-tests-acceptance $(TEST_ARGS )
41
37
42
- vet-check :
43
- go vet ./libvirt
44
-
45
- lint-check :
46
- go run golang.org/x/lint/golint -set_exit_status ./libvirt .
47
-
48
- fmt-check :
49
- go fmt ./libvirt .
38
+ golangcilint :
39
+ golangci-lint run
50
40
51
- tf-check :
41
+ tflint :
52
42
terraform fmt -write=false -check=true -diff=true examples/
53
43
44
+ lint : golangcilint tflint
45
+
54
46
clean :
55
47
rm -f terraform-provider-libvirt
56
48
57
49
cleanup :
58
50
./travis/cleanup.sh
59
51
60
- .PHONY : build install test testacc vet-check fmt-check lint-check
52
+ .PHONY : build install test testacc tflint golangcilint lint
You can’t perform that action at this time.
0 commit comments