Skip to content

Commit 690fabf

Browse files
committed
cleanup Makfile
1 parent 74035f2 commit 690fabf

File tree

2 files changed

+13
-21
lines changed

2 files changed

+13
-21
lines changed

.github/workflows/test.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Tests
1+
name: Build and Test
22
on:
33
pull_request:
44
paths-ignore:
@@ -14,13 +14,16 @@ permissions:
1414
contents: read
1515
pull-requests: read
1616
jobs:
17-
golangci:
18-
name: lint
17+
lint:
18+
name: Lint
1919
runs-on: ubuntu-latest
2020
steps:
2121
- uses: actions/checkout@v2
2222
with:
2323
fetch-depth: 2
24+
- name: terraform fmt
25+
run: |
26+
make tflint
2427
- name: golangci-lint
2528
uses: golangci/golangci-lint-action@v2
2629
with:
@@ -46,9 +49,6 @@ jobs:
4649
uses: actions/checkout@v2
4750
- name: Setup terraform
4851
uses: hashicorp/setup-terraform@v1
49-
- name: Terraform fmt
50-
run: |
51-
make tf-check
5252
- name: Build
5353
run: |
5454
make

Makefile

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ default: build
88
terraform-provider-libvirt:
99
go build -ldflags "${LDFLAGS}"
1010

11-
build: fmt-check lint-check vet-check terraform-provider-libvirt
11+
build: terraform-provider-libvirt
1212

1313
install:
1414
go install -ldflags "${LDFLAGS}"
@@ -20,10 +20,6 @@ install:
2020
test:
2121
go test -v $(TEST_ARGS_DEF) $(TEST_ARGS) ./libvirt
2222

23-
lint:
24-
golangci-lint run
25-
terraform fmt -write=false -check=true -diff=true examples/
26-
2723
# acceptance tests
2824
# usage:
2925
#
@@ -39,22 +35,18 @@ lint:
3935
testacc:
4036
./travis/run-tests-acceptance $(TEST_ARGS)
4137

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
5040

51-
tf-check:
41+
tflint:
5242
terraform fmt -write=false -check=true -diff=true examples/
5343

44+
lint: golangcilint tflint
45+
5446
clean:
5547
rm -f terraform-provider-libvirt
5648

5749
cleanup:
5850
./travis/cleanup.sh
5951

60-
.PHONY: build install test testacc vet-check fmt-check lint-check
52+
.PHONY: build install test testacc tflint golangcilint lint

0 commit comments

Comments
 (0)