-
Notifications
You must be signed in to change notification settings - Fork 39
/
Copy path.travis.yml
66 lines (62 loc) · 2.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
matrix:
include:
# tests (v4)
- language: node_js
dist: jammy
name: Backend tests (V4)
git:
submodules: false
depth: 1
node_js:
- "18.12.1"
sudo: true
addons:
apt:
packages:
- expect-dev
- rabbitmq-server
hosts:
- test.127.0.0.1
- localhost
services:
- docker
before_install:
- sudo apt remove mongodb && sudo apt purge mongodb && sudo apt autoremove && sudo rm -rf /var/lib/mongodb
- sudo apt-get -y install gnupg curl
- curl -fsSL https://www.mongodb.org/static/pgp/server-6.0.asc | sudo gpg -o /usr/share/keyrings/mongodb-server-6.0.gpg --dearmor
- echo "deb [ arch=amd64,arm64 signed-by=/usr/share/keyrings/mongodb-server-6.0.gpg ] https://repo.mongodb.org/apt/ubuntu jammy/mongodb-org/6.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-6.0.list
- sudo apt-get update
- sudo apt-get install -y mongodb-org mongodb-org-database mongodb-org-server mongodb-org-mongos mongodb-org-tools
- sudo mkdir -p /var/lib/mongodb
- sudo chmod 777 /var/lib/mongodb
- sudo systemctl daemon-reload && sudo systemctl start mongod && echo $(mongod --version)
- sudo mkdir -p /var/lib/mongodb
- sudo chmod 777 /var/lib/mongodb
- mkdir -p submodules
- test_ver=`cat backend/testDBVersion`
- cd submodules
- git clone https://$TESTS_USER:[email protected]/3drepo/tests.git
- cd tests
- git checkout $test_ver
- git status
- cd backend && mongorestore
- cd ../../../
- cp -r ./submodules/tests/frontend/staticPages/legal/ ./resources/legal
install:
- cd ./backend
- yarn install
- cd ./../frontend
- DETECT_CHROMEDRIVER_VERSION=true yarn install
- yarn build
script:
- cd ../backend
- mkdir coverage
- unbuffer yarn test
- cd ../
- NODE_ENV=test NODE_CONFIG_DIR='./config' node "./backend/3drepo.js" &
- cd ./frontend
#- unbuffer yarn test
notifications:
email:
recipients: