service/vendor/github.com/qiniu/qmgo/.travis.yml

22 lines
575 B
YAML
Raw Normal View History

2023-12-21 22:17:40 +08:00
language: go
go:
- "1.16"
env:
- GO111MODULE=on
services:
- mongodb
before_script:
- sleep 15 # https://docs.travis-ci.com/user/database-setup/#mongodb-does-not-immediately-accept-connections
- echo "replication:" | sudo tee -a /etc/mongod.conf
- |-
echo " replSetName: \"rs0\"" | sudo tee -a /etc/mongod.conf
- sudo service mongod restart
- sleep 15
- mongo --eval 'rs.initiate()'
- sleep 5
script:
- mongod --version
- go test -race -coverprofile=coverage.txt -covermode=atomic ./...
after_success:
- bash <(curl -s https://codecov.io/bash)