-
-
Notifications
You must be signed in to change notification settings - Fork 7
/
.travis.yml
43 lines (35 loc) · 1.2 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
dist: jammy
language: go
go:
- 1.22.2
services:
- docker
env:
global:
- MONGODB=6.0.14
- MONGOSH=2.2.3
cache:
directories:
- $HOME/.cache/go-build
before_install:
- sudo apt update
- sudo apt install -y docker-buildx mongodb-org=${MONGODB} mongodb-org-database=${MONGODB} mongodb-org-server=${MONGODB} mongodb-mongosh=${MONGOSH} mongodb-org-mongos=${MONGODB} mongodb-org-tools=${MONGODB}
- mkdir /tmp/data
- /usr/bin/mongod --dbpath /tmp/data --bind_ip 127.0.0.1 --replSet rs0 --logpath ${PWD}/mongod.log &> /dev/null &
- until nc -z localhost 27017; do echo Waiting for MongoDB; sleep 1; done
- /usr/bin/mongosh --eval 'rs.initiate(); while (rs.status().startupStatus || (rs.status().hasOwnProperty("myState") && rs.status().myState != 1)) { printjson( rs.status() ); sleep(1000); }; printjson( rs.status() );'
addons:
apt:
sources:
- sourceline: 'deb https://repo.mongodb.org/apt/ubuntu jammy/mongodb-org/7.0 multiverse'
key_url: 'https://pgp.mongodb.com/server-7.0.asc'
artifacts:
s3_region: us-west-2
paths:
- $(git ls-files -o deploy/*/*-*.tar.gz | tr "\n" ":")
target_paths:
- /
script:
- ./build.sh
- ./test.sh
- ./artifact.sh