mirror of
https://github.com/sot-tech/mochi.git
synced 2026-07-22 15:58:11 -07:00
travis: refactor into scripts&configs, move to dist/travis
This commit is contained in:
Vendored
+22
@@ -0,0 +1,22 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
go test -v -race $(go list ./...)
|
||||
go vet $(go list ./...)
|
||||
diff <(goimports -local github.com/chihaya/chihaya -d $(find . -type f -name '*.go' -not -path "./vendor/*")) <(printf "")
|
||||
(for d in $(go list ./...); do diff <(golint $d) <(printf "") || exit 1; done)
|
||||
go install github.com/chihaya/chihaya/cmd/chihaya
|
||||
|
||||
# Run e2e test with example config.
|
||||
chihaya --config=./dist/travis/config_memory.yaml --debug&
|
||||
pid=$!
|
||||
sleep 2 # wait for Chihaya to start up (gross)
|
||||
chihaya e2e --debug
|
||||
kill $pid
|
||||
|
||||
# Run e2e test with redis.
|
||||
chihaya --config=./dist/travis/config_redis.yaml --debug&
|
||||
pid=$!
|
||||
sleep 2 # wait for Chihaya to start up (gross)
|
||||
chihaya e2e --debug
|
||||
kill $pid
|
||||
Vendored
+42
@@ -0,0 +1,42 @@
|
||||
# This config file is used by travis for end-to-end testing.
|
||||
# See example_config.yaml for a commented, more complete configuration!
|
||||
|
||||
chihaya:
|
||||
announce_interval: 30m
|
||||
min_announce_interval: 15m
|
||||
prometheus_addr: "0.0.0.0:6880"
|
||||
|
||||
http:
|
||||
addr: "0.0.0.0:6969"
|
||||
https_addr: ""
|
||||
tls_cert_path: ""
|
||||
tls_key_path: ""
|
||||
read_timeout: 5s
|
||||
write_timeout: 5s
|
||||
enable_keepalive: false
|
||||
idle_timeout: 30s
|
||||
enable_request_timing: false
|
||||
enable_legacy_php_urls: false
|
||||
allow_ip_spoofing: false
|
||||
real_ip_header: "x-real-ip"
|
||||
max_numwant: 100
|
||||
default_numwant: 50
|
||||
max_scrape_infohashes: 50
|
||||
|
||||
udp:
|
||||
addr: "0.0.0.0:6969"
|
||||
max_clock_skew: 10s
|
||||
private_key: "paste a random string here that will be used to hmac connection IDs"
|
||||
enable_request_timing: false
|
||||
allow_ip_spoofing: false
|
||||
max_numwant: 100
|
||||
default_numwant: 50
|
||||
max_scrape_infohashes: 50
|
||||
|
||||
storage:
|
||||
name: memory
|
||||
config:
|
||||
gc_interval: 3m
|
||||
peer_lifetime: 31m
|
||||
shard_count: 1024
|
||||
prometheus_reporting_interval: 1s
|
||||
Vendored
+45
@@ -0,0 +1,45 @@
|
||||
# This config file is used by travis for end-to-end testing.
|
||||
# See example_config.yaml for a commented, more complete configuration!
|
||||
|
||||
chihaya:
|
||||
announce_interval: 30m
|
||||
min_announce_interval: 15m
|
||||
prometheus_addr: "0.0.0.0:6880"
|
||||
|
||||
http:
|
||||
addr: "0.0.0.0:6969"
|
||||
https_addr: ""
|
||||
tls_cert_path: ""
|
||||
tls_key_path: ""
|
||||
read_timeout: 5s
|
||||
write_timeout: 5s
|
||||
enable_keepalive: false
|
||||
idle_timeout: 30s
|
||||
enable_request_timing: false
|
||||
enable_legacy_php_urls: false
|
||||
allow_ip_spoofing: false
|
||||
real_ip_header: "x-real-ip"
|
||||
max_numwant: 100
|
||||
default_numwant: 50
|
||||
max_scrape_infohashes: 50
|
||||
|
||||
udp:
|
||||
addr: "0.0.0.0:6969"
|
||||
max_clock_skew: 10s
|
||||
private_key: "paste a random string here that will be used to hmac connection IDs"
|
||||
enable_request_timing: false
|
||||
allow_ip_spoofing: false
|
||||
max_numwant: 100
|
||||
default_numwant: 50
|
||||
max_scrape_infohashes: 50
|
||||
|
||||
storage:
|
||||
name: redis
|
||||
config:
|
||||
gc_interval: 3m
|
||||
peer_lifetime: 31m
|
||||
prometheus_reporting_interval: 1s
|
||||
redis_broker: "redis://pwd@127.0.0.1:6379/0"
|
||||
redis_read_timeout: 15s
|
||||
redis_write_timeout: 15s
|
||||
redis_connect_timeout: 15s
|
||||
Vendored
+8
@@ -0,0 +1,8 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
# Install golint and go vet.
|
||||
go get -u golang.org/x/lint/golint
|
||||
go get -u golang.org/x/tools/cmd/...
|
||||
|
||||
go mod download
|
||||
Vendored
+8
@@ -0,0 +1,8 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
# Install golint and go vet.
|
||||
go get -u golang.org/x/lint/golint
|
||||
go get -u golang.org/x/tools/cmd/...
|
||||
|
||||
go get -t -u ./...
|
||||
Reference in New Issue
Block a user