-
Notifications
You must be signed in to change notification settings - Fork 3
/
.travis.yml
41 lines (33 loc) · 1.19 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
dist: jammy
language: node_js
node_js:
- 20.12.1
services:
- docker
env:
global:
- MONGODB=mongodb-linux-x86_64-ubuntu2204-6.0.14
- MONGOSH=mongosh-2.2.3-linux-x64
before_install:
- sudo apt-get remove -y mongodb-org mongodb-org-mongos mongodb-org-server mongodb-org-shell mongodb-org-tools
- wget https://fastdl.mongodb.org/linux/${MONGODB}.tgz -O /tmp/mongodb.tgz
- tar -xf /tmp/mongodb.tgz
- wget https://downloads.mongodb.com/compass/${MONGOSH}.tgz -O /tmp/mongosh.tgz
- tar -xf /tmp/mongosh.tgz
- mkdir /tmp/data
- ${PWD}/${MONGODB}/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
- ${PWD}/${MONGOSH}/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:
artifacts:
s3_region: us-west-2
paths:
- $(git ls-files -o deploy/*/*-*.tar.gz | tr "\n" ":")
target_paths:
- /
install:
- npm install
script:
- npm run lint
- npm run test
- ./artifact.sh