From 4d60e76241a75b84361b88946587455c94306a45 Mon Sep 17 00:00:00 2001 From: Niels de Vos Date: Fri, 17 Apr 2020 12:23:44 +0200 Subject: [PATCH] travis: split static checks and continue with tests in case one fails Signed-off-by: Niels de Vos --- .travis.yml | 6 ++++-- Makefile | 8 +++++++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 0a36d6865..61cf7e238 100644 --- a/.travis.yml +++ b/.travis.yml @@ -69,9 +69,11 @@ jobs: # install helm for helm lint - curl -L https://git.io/get_helm.sh | bash script: - - make static-check + - make go-lint + - make go-lint-text + - make gosec - make go-test - - make mod-check || travis_terminate 1; + - make mod-check - name: containerized test (Fedora) and build (CentOS) script: diff --git a/Makefile b/Makefile index 0207d66c8..1c8f22d74 100644 --- a/Makefile +++ b/Makefile @@ -44,7 +44,9 @@ endif all: cephcsi +.PHONY: go-test static-check mod-check go-lint go-lint-text gosec test: go-test static-check mod-check +static-check: go-lint go-lint-text gosec go-test: ./scripts/test-go.sh @@ -52,9 +54,13 @@ go-test: mod-check: go mod verify -static-check: +go-lint: ./scripts/lint-go.sh + +go-lint-text: ./scripts/lint-text.sh --require-all + +gosec: ./scripts/gosec.sh func-test: