Split lint from test
parent
42595c13eb
commit
6e823b462a
|
@ -51,7 +51,7 @@ jobs:
|
|||
${DISCORD_WEBHOOK}
|
||||
- store_test_results:
|
||||
path: ./
|
||||
test:
|
||||
lint:
|
||||
docker:
|
||||
- image: golang:1.15
|
||||
steps:
|
||||
|
@ -68,6 +68,13 @@ jobs:
|
|||
exit 1
|
||||
fi
|
||||
- run: make install-tools
|
||||
- run: make lint
|
||||
test:
|
||||
docker:
|
||||
- image: golang:1.15
|
||||
steps:
|
||||
- checkout
|
||||
- run: make install-tools
|
||||
- run: make test
|
||||
- run:
|
||||
name: Codecov upload
|
||||
|
@ -148,6 +155,11 @@ workflows:
|
|||
- main
|
||||
pullrequest:
|
||||
jobs:
|
||||
- lint:
|
||||
filters:
|
||||
branches:
|
||||
ignore:
|
||||
- main
|
||||
- test:
|
||||
filters:
|
||||
branches:
|
||||
|
@ -168,6 +180,12 @@ workflows:
|
|||
only: /^v.*/
|
||||
branches:
|
||||
ignore: /.*/
|
||||
- lint:
|
||||
filters:
|
||||
tags:
|
||||
only: /^v.*/
|
||||
branches:
|
||||
ignore: /.*/
|
||||
- test:
|
||||
filters:
|
||||
tags:
|
||||
|
@ -186,6 +204,7 @@ workflows:
|
|||
- release:
|
||||
context: driftctl
|
||||
requires:
|
||||
- lint
|
||||
- test
|
||||
- sign_release
|
||||
filters:
|
||||
|
|
4
Makefile
4
Makefile
|
@ -25,7 +25,7 @@ release:
|
|||
ENV=release scripts/build.sh
|
||||
|
||||
.PHONY: test
|
||||
test: deps lint
|
||||
test: deps
|
||||
$(GOTEST) --format testname --junitfile unit-tests.xml -- -coverprofile=cover.out -coverpkg=.,./pkg/... ./...
|
||||
|
||||
.PHONY: coverage
|
||||
|
@ -54,7 +54,7 @@ clean:
|
|||
.PHONY: lint
|
||||
lint:
|
||||
@which golangci-lint > /dev/null 2>&1 || (curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | bash -s -- -b $(GOBINPATH) v1.31.0)
|
||||
golangci-lint run --timeout=2m
|
||||
golangci-lint run -v --timeout=4m
|
||||
|
||||
.PHONY: deps
|
||||
deps:
|
||||
|
|
Loading…
Reference in New Issue