Skip to content
This repository has been archived by the owner on Mar 1, 2020. It is now read-only.

Commit

Permalink
Add travis yaml (#60)
Browse files Browse the repository at this point in the history
  • Loading branch information
tahsinrahman authored and tamalsaha committed Mar 15, 2018
1 parent 0672c51 commit 24df5dd
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -24,3 +24,4 @@ _testmain.go
.idea/
dist/
.vscode/
coverage.txt
13 changes: 13 additions & 0 deletions .travis.yml
@@ -0,0 +1,13 @@
language: go
go:
- 1.x
- tip

install: true

script:
- go build ./...
- ./hack/coverage.sh

after_success:
- bash <(curl -s https://codecov.io/bash)
4 changes: 4 additions & 0 deletions README.md
@@ -1,4 +1,8 @@
[![Go Report Card](https://goreportcard.com/badge/github.com/kubepack/pack)](https://goreportcard.com/report/github.com/kubepack/pack)
[![Build Status](https://travis-ci.org/kubepack/pack.svg?branch=master)](https://travis-ci.org/kubepack/pack)
[![codecov](https://codecov.io/gh/kubepack/pack/branch/master/graph/badge.svg)](https://codecov.io/gh/kubepack/pack)
[![Slack](http://slack.kubernetes.io/badge.svg)](http://slack.kubernetes.io)
[![Twitter](https://img.shields.io/twitter/follow/kubepack.svg?style=social&logo=twitter&label=Follow)](https://twitter.com/intent/follow?screen_name=kubepack)

[Website](https://kubepack.com)[Slack](http://slack.kubernetes.io)[Twitter](https://twitter.com/Kubepack)

Expand Down
13 changes: 13 additions & 0 deletions glide-slow
@@ -0,0 +1,13 @@
#!/usr/bin/env bash

# You can execute me through Glide by doing the following:
# - Execute `glide slow`
# - ???
# - Profit

pushd $GOPATH/src/github.com/kubepack/pack

glide up -v
glide vc --use-lock-file --only-code --no-tests

popd
19 changes: 19 additions & 0 deletions hack/coverage.sh
@@ -0,0 +1,19 @@
#!/usr/bin/env bash
set -eou pipefail

GOPATH=$(go env GOPATH)
REPO_ROOT="$GOPATH/src/github.com/kubepack/pack"

pushd $REPO_ROOT

echo "" > coverage.txt

for d in $(go list ./... | grep -v -e vendor -e test); do
go test -v -race -coverprofile=profile.out -covermode=atomic "$d"
if [ -f profile.out ]; then
cat profile.out >> coverage.txt
rm profile.out
fi
done

popd

0 comments on commit 24df5dd

Please sign in to comment.