Skip to content

Commit

Permalink
Merge pull request #8 from open-cluster-management/update-go-version
Browse files Browse the repository at this point in the history
go commands working locally but not in travis
  • Loading branch information
gparvin committed Mar 7, 2020
2 parents 5f938e3 + a2791fe commit ca57df3
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
3 changes: 1 addition & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

language: go
go:
- 1.13.x
- 1.14.x

os:
- linux
Expand Down Expand Up @@ -58,7 +58,6 @@ jobs:
- |
make
make component/test/unit
make sonar/go || echo "Sonar/Go processing failed: rc=$?"
- stage: test-e2e
name: "Run e2e tests"
if: type = pull_request
Expand Down
10 changes: 9 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ default::
@echo "Build Harness Bootstrapped"

.PHONY: all test dependencies build-prod image rhel-image manager run deploy install \
fmt vet generate
fmt vet generate go-coverage

all: test manager

Expand Down Expand Up @@ -60,3 +60,11 @@ vet:
generate:
go generate ./pkg/... ./cmd/...

go-coverage:
$(shell go test -coverprofile=coverage.out -json ./...\
$$(go list ./... | \
grep -v '/vendor/' | \
grep -v '/docs/' \
) > report.json)
gosec --quiet -fmt sonarqube -out gosec.json -no-fail ./...
sonar-scanner --debug || echo "Sonar scanner is not available"
3 changes: 3 additions & 0 deletions build/run-unit-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,6 @@ set -e

export DOCKER_IMAGE_AND_TAG=${1}
# make docker/run

make go/gosec-install
make go-coverage

0 comments on commit ca57df3

Please sign in to comment.