-
Notifications
You must be signed in to change notification settings - Fork 2
/
.travis.yml
32 lines (32 loc) · 975 Bytes
/
.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
dist: trusty
sudo: yes
language: node_js
node_js:
- "node"
cache:
directories:
- "node_modules"
before_install:
- npm i -g standard
- npm i -g mocha
install:
- travis_retry npm install
script:
# set PATH
- export PATH=./node_modules/.bin:/usr/bin:/bin:/snap/bin:$PATH
# exit on fail
- set -eo pipefail
# setup LXD group
- sudo groupadd --system lxd
- sudo usermod -a -G lxd $USER
# install lxd
- sudo apt-get --yes install snapd
- sudo snap install lxd
- sudo lxd waitready
- sudo lxd init --auto --network-address="127.0.0.1" --storage-backend=dir --trust-password=$lxdSecret
# setup LXD REST api
- openssl genrsa 2048 > client.key
- openssl req -new -x509 -nodes -sha1 -days 365 -key client.key -out client.crt -subj "/C=GB/ST=London/L=London/O=TEST/OU=IT Department/CN=ssl.cherone.co.uk"
- sudo lxd.lxc config trust add client.crt
- curl -k -L --cert client.crt --key client.key "https://127.0.0.1:8443/1.0"
- npm run test