mirror of
https://github.com/tuna/tunasync.git
synced 2025-04-20 20:22:46 +00:00
chore: travis CI and coverall integration
This commit is contained in:
parent
ed896b16c1
commit
66df20cb1d
31
.testandcover.bash
Executable file
31
.testandcover.bash
Executable file
@ -0,0 +1,31 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
|
||||||
|
function die() {
|
||||||
|
echo $*
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
export GOPATH=`pwd`:$GOPATH
|
||||||
|
|
||||||
|
# Initialize profile.cov
|
||||||
|
echo "mode: count" > profile.cov
|
||||||
|
|
||||||
|
# Initialize error tracking
|
||||||
|
ERROR=""
|
||||||
|
|
||||||
|
# Test each package and append coverage profile info to profile.cov
|
||||||
|
for pkg in `cat .testpackages.txt`
|
||||||
|
do
|
||||||
|
#$HOME/gopath/bin/
|
||||||
|
go test -v -covermode=count -coverprofile=profile_tmp.cov $pkg || ERROR="Error testing $pkg"
|
||||||
|
|
||||||
|
[ -f profile_tmp.cov ] && {
|
||||||
|
tail -n +2 profile_tmp.cov >> profile.cov || die "Unable to append coverage for $pkg"
|
||||||
|
}
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ ! -z "$ERROR" ]
|
||||||
|
then
|
||||||
|
die "Encountered error, last error was: $ERROR"
|
||||||
|
fi
|
2
.testpackages.txt
Normal file
2
.testpackages.txt
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
github.com/tuna/tunasync/internal
|
||||||
|
github.com/tuna/tunasync/manager
|
16
.travis.yml
Normal file
16
.travis.yml
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
language: go
|
||||||
|
go:
|
||||||
|
- 1.6
|
||||||
|
|
||||||
|
before_install:
|
||||||
|
- go get golang.org/x/tools/cmd/cover
|
||||||
|
- go get -v github.com/mattn/goveralls
|
||||||
|
|
||||||
|
os:
|
||||||
|
- linux
|
||||||
|
|
||||||
|
script:
|
||||||
|
- ./.testandcover.bash
|
||||||
|
|
||||||
|
after_success:
|
||||||
|
- goveralls -coverprofile=profile.cov -service=travis-ci
|
@ -1,9 +1,8 @@
|
|||||||
tunasync
|
tunasync
|
||||||
========
|
========
|
||||||
|
|
||||||
## Ideas
|
[](https://travis-ci.org/tuna/tunasync)
|
||||||
|
[](https://coveralls.io/github/tuna/tunasync?branch=dev)
|
||||||
- use [etcd](https://github.com/coreos/etcd) to store configurations and state variables
|
|
||||||
|
|
||||||
## Design
|
## Design
|
||||||
|
|
||||||
@ -39,7 +38,9 @@ tunasync
|
|||||||
## TODO
|
## TODO
|
||||||
|
|
||||||
- [ ] split to `tunasync-manager` and `tunasync-worker` instances
|
- [ ] split to `tunasync-manager` and `tunasync-worker` instances
|
||||||
- use HTTP as communication protocol
|
- [ ] use HTTP as communication protocol
|
||||||
|
- [ ] implement manager as status server first, and use python worker
|
||||||
|
- [ ] implement go worker
|
||||||
- Web frontend for `tunasync-manager`
|
- Web frontend for `tunasync-manager`
|
||||||
- [ ] start/stop/restart job
|
- [ ] start/stop/restart job
|
||||||
- [ ] enable/disable mirror
|
- [ ] enable/disable mirror
|
||||||
|
Loading…
x
Reference in New Issue
Block a user