Skip to content

Commit

Permalink
add travis-ci
Browse files Browse the repository at this point in the history
  • Loading branch information
halfrost committed Aug 6, 2020
1 parent ca60fc2 commit ef3da5d
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
language: go

go:
- master

# whitelist
branches:
only:
- master
- stable

script:
- go get -t -v ./...
- go vet ./...
- bash ./gotest.sh

after_success:
- bash <(curl -s https://codecov.io/bash)
13 changes: 13 additions & 0 deletions gotest.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/usr/bin/env bash

set -e
echo "" > coverage.txt

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

0 comments on commit ef3da5d

Please sign in to comment.