Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: Travis & Codecov Integration #3

Merged
merged 8 commits into from
Aug 8, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cover.out
cover.html
coverage.txt
coverage.html
test-bdd/*.xml
bin
bin/*
Expand Down
22 changes: 22 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
language: go

go:
- "1.12.5"

env:
- GO111MODULE=on

jobs:
include:
- stage: unit-test
script:
- make test
- bash <(curl -s https://codecov.io/bash)
- stage: publish-image
if: type = push
env:
- IMG=orkaproj/instance-manager:$TRAVIS_BRANCH
script:
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
- make docker-build
- make docker-push
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ all: manager

# Run tests
test: generate fmt vet manifests
go test -v ./controllers/... -coverprofile cover.out
go test -v ./controllers/... -coverprofile coverage.txt

# Run verbose tests
vtest: generate fmt vet manifests
go test -v ./controllers/... -coverprofile cover.out --logging-enabled
go test -v ./controllers/... -coverprofile coverage.txt --logging-enabled

bdd:
go test -timeout 60m -v ./test-bdd/ -ginkgo.v -ginkgo.progress --ginkgo.failFast \
Expand All @@ -28,8 +28,8 @@ bdd:
--subnets ${SUBNETS}

coverage:
go test -coverprofile cover.out -v ./controllers/...
go tool cover -html=cover.out -o cover.html
go test -coverprofile coverage.txt -v ./controllers/...
go tool cover -html=coverage.txt -o coverage.html

# Build manager binary
manager: generate fmt vet
Expand Down
2 changes: 2 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
coverage:
range: "70...90"