Skip to content

Commit 115ee4f

Browse files
committed
chore(travis): run docker test job on travis
1 parent 60f476e commit 115ee4f

File tree

2 files changed

+27
-15
lines changed

2 files changed

+27
-15
lines changed

.travis.yml

+23-14
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,26 @@
1-
language: node_js
2-
sudo: false
3-
node_js:
4-
- 6
5-
- 8
6-
- 10
1+
sudo: required
72

8-
addons:
9-
apt:
10-
sources:
11-
- ubuntu-toolchain-r-test
12-
packages:
13-
- g++-4.8
3+
language: generic
144

15-
env:
16-
- CXX=g++-4.8
5+
services:
6+
- docker
177

8+
matrix:
9+
include:
10+
- env: NODE_LTS=argon
11+
- env: NODE_LTS=boron
12+
- env: NODE_LTS=carbon
13+
14+
script:
15+
- >
16+
docker run
17+
-i
18+
-v $(pwd):/app
19+
-w /app
20+
-e NODE_LTS=$NODE_LTS
21+
-e KERBEROS_USERNAME=administrator
22+
-e KERBEROS_PASSWORD=Password01
23+
-e KERBEROS_REALM=example.com
24+
-e KERBEROS_PORT=80
25+
ubuntu:16.04
26+
/bin/bash ./test/scripts/travis.sh

test/scripts/travis.sh

+4-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ set -e
44

55
IP_ADDRESS=$(hostname -I)
66
HOSTNAME=$(cat /etc/hostname)
7+
NODE_LTS=${NODE_LTS:-argon}
78

89
export KERBEROS_HOSTNAME=$HOSTNAME.$KERBEROS_REALM
910
export DEBIAN_FRONTEND=noninteractive
@@ -119,7 +120,9 @@ echo "Installing Node.js"
119120
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash
120121
export NVM_DIR="$HOME/.nvm"
121122
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
122-
nvm install --lts=carbon
123+
nvm install --lts=$NODE_LTS
123124

124125
echo "Installing dependencies and running test"
125126
npm install --unsafe-perm
127+
npx mocha test/kerberos_tests.js
128+

0 commit comments

Comments
 (0)