forked from node-opcua/node-opcua
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
95 lines (84 loc) · 2.63 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
sudo: false
language: node_js
node_js:
# dropping support for node 0.10 - "0.10"
# dropping support for node 0.12 - "0.12"
# dropping support for node 4
- "6"
# dropped - "7"
- "8"
- "9"
- "10"
os:
- linux
- osx
matrix:
allow_failures:
- os: osx
before_install:
# make sure we have enough ephemeral port on MacOS
# https://superuser.com/questions/145989/does-mac-os-x-throttle-the-rate-of-socket-creation
# https://superuser.com/a/443168
- if [[ $TRAVIS_OS_NAME =~ ^osx$ ]]; then
sudo ulimit -a;
sudo sysctl net.inet.ip.portrange.first net.inet.ip.portrange.hifirst net.inet.ip.portrange.last net.inet.ip.portrange.hilast;
sudo sysctl -w net.inet.ip.portrange.first=32768;
sudo sysctl -w net.inet.ip.portrange.hifirst=32768;
sudo sysctl -w net.inet.tcp.msl=1000;
sudo sysctl kern.maxfiles;
sysctl kern.maxfilesperproc;
echo " setting new limits";
sudo sysctl -w kern.maxfiles=50000;
sudo sysctl -w kern.maxfilesperproc=20000;
sudo serverinfo --setperfmode true;
sudo ulimit -c unlimited;
sudo ulimit -n 1024;
sudo ulimit -l unlimited;
sudo ulimit -a;
fi;
- if [[ $TRAVIS_OS_NAME =~ ^osx$ ]]; then
brew install libressl;
export PATH=/usr/local/opt/libressl/bin:$PATH;
fi;
- openssl version
before_script:
- npm install -g mocha
- if [[ $TRAVIS_OS_NAME =~ ^linux$ ]]; then
if [[ $TRAVIS_NODE_VERSION =~ ^10$ ]]; then
npm install -g istanbul coveralls;
npm install -g codeclimate-test-reporter;
fi;
fi;
# memcpy only works with node version > 0.8 and <= 0.12, and not with io.js, at this time
- if [[ `node --version` == v0.12 ]]; then npm i memcpy ; fi
- if [[ `node --version` == v0.10* ]]; then npm i ursa@0.8.5 ; fi
install:
- npm install -g npm
- npm install typescript -g
- npm ci
# keep the npm cache around to speed up installs
cache:
directories:
- "$HOME/.npm"
after_success:
# only run code coverage on linux and latest nodejs version
- if [[ $TRAVIS_OS_NAME =~ ^linux$ ]]; then
if [[ $TRAVIS_NODE_VERSION =~ ^10$ ]]; then
make test-cov;
fi;
fi;
script:
- if [[ $TRAVIS_OS_NAME =~ ^osx$ ]];
then npm test ;
else npm test;
fi
addons:
code_climate:
repo_token: 0860a573fd01a1fbafc298b7c40cd0c1fd8b25e5f53a5e8346d3b42cb40ab48e
notifications:
webhooks:
urls:
- https://webhooks.gitter.im/e/4d51130aaea652dbc8f1
on_success: always # options: [always|never|change] default: always
on_failure: always # options: [always|never|change] default: always
on_start: true # default: false