Merge branch 'feature/travis-ci' into develop
This commit is contained in:
commit
689c27e163
|
@ -0,0 +1,16 @@
|
||||||
|
language: go
|
||||||
|
|
||||||
|
go:
|
||||||
|
- 1.7.1
|
||||||
|
|
||||||
|
sudo: false
|
||||||
|
|
||||||
|
install:
|
||||||
|
- go get golang.org/x/tools/cmd/cover
|
||||||
|
|
||||||
|
script:
|
||||||
|
- make ci
|
||||||
|
|
||||||
|
cache:
|
||||||
|
directories:
|
||||||
|
- .ethereumtest
|
5
Makefile
5
Makefile
|
@ -29,6 +29,11 @@ xgo:
|
||||||
build/env.sh docker pull farazdagi/xgo
|
build/env.sh docker pull farazdagi/xgo
|
||||||
build/env.sh go get github.com/karalabe/xgo
|
build/env.sh go get github.com/karalabe/xgo
|
||||||
|
|
||||||
|
ci:
|
||||||
|
build/env.sh go test -v -cover ./geth
|
||||||
|
build/env.sh go test -v -cover ./jail
|
||||||
|
build/env.sh go test -v -cover ./extkeys
|
||||||
|
|
||||||
test-all:
|
test-all:
|
||||||
@build/env.sh echo "mode: set" > coverage-all.out
|
@build/env.sh echo "mode: set" > coverage-all.out
|
||||||
build/env.sh go test -coverprofile=coverage.out -covermode=set ./geth
|
build/env.sh go test -coverprofile=coverage.out -covermode=set ./geth
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
[
|
[
|
||||||
"enode://1bd9b8a8063810e91cd1ebcf2995ac867542d5c90dc74a6f2ada7ecd399da356d18abf3af4c84788808abde8891a75bcde4ace5a741a2ba9efe9b59dd09d5b33@46.101.97.80:30303"
|
"enode://4e2bb6b09aa34375ae2df23fa063edfe7aaec952dba972449158ae0980a4abd375aca3c06a519d4f562ff298565afd288a0ed165944974b2557e6ff2c31424de@138.68.73.175:30303"
|
||||||
]
|
]
|
||||||
|
|
|
@ -4,6 +4,7 @@ import (
|
||||||
"os"
|
"os"
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
"path/filepath"
|
||||||
|
|
||||||
"github.com/status-im/status-go/geth"
|
"github.com/status-im/status-go/geth"
|
||||||
)
|
)
|
||||||
|
@ -22,7 +23,7 @@ const (
|
||||||
|
|
||||||
func TestMain(m *testing.M) {
|
func TestMain(m *testing.M) {
|
||||||
syncRequired := false
|
syncRequired := false
|
||||||
if _, err := os.Stat(geth.TestDataDir); os.IsNotExist(err) {
|
if _, err := os.Stat(filepath.Join(geth.TestDataDir, "testnet")); os.IsNotExist(err) {
|
||||||
syncRequired = true
|
syncRequired = true
|
||||||
}
|
}
|
||||||
// make sure you panic if node start signal is not received
|
// make sure you panic if node start signal is not received
|
||||||
|
|
|
@ -23,7 +23,7 @@ var muPrepareTestNode sync.Mutex
|
||||||
|
|
||||||
const (
|
const (
|
||||||
TestDataDir = "../.ethereumtest"
|
TestDataDir = "../.ethereumtest"
|
||||||
TestNodeSyncSeconds = 300
|
TestNodeSyncSeconds = 480
|
||||||
)
|
)
|
||||||
|
|
||||||
type NodeNotificationHandler func(jsonEvent string)
|
type NodeNotificationHandler func(jsonEvent string)
|
||||||
|
@ -90,7 +90,7 @@ func PrepareTestNode() (err error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
syncRequired := false
|
syncRequired := false
|
||||||
if _, err := os.Stat(TestDataDir); os.IsNotExist(err) {
|
if _, err := os.Stat(filepath.Join(TestDataDir, "testnet")); os.IsNotExist(err) {
|
||||||
syncRequired = true
|
syncRequired = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue