This repository has been archived by the owner on Nov 6, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 27
/
.travis.yml
85 lines (71 loc) · 2.55 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
sudo: required
language: node_js
node_js:
- "12"
services:
- docker
# docker build -t openid-certification/oidctest -f docker/op_test/Dockerfile .
# docker run -p 60000-60010:60000-60010 openid-certification/oidctest
# docker build -t openid-certification/op -f docker/op/Dockerfile .
# docker run -p 4433:4433 openid-certification/op
addons:
apt:
packages:
- google-chrome-stable
- libnss3-tools
hosts:
- rp-test
- op-test
- op
before_install:
- docker-compose -f docker/docker-compose.yml up -d
install:
- cd $TRAVIS_BUILD_DIR/..
- git clone https://github.com/openid-certification/oidc-provider-conformance-tests.git
- cd oidc-provider-conformance-tests
- npm install --production
- cd $TRAVIS_BUILD_DIR/..
- git clone https://github.com/openid-certification/openid-client-conformance-tests.git
- cd openid-client-conformance-tests
- npm install --production
before_script:
# wait for docker containers to start up
- while ! curl -k https://op:4433 >/dev/null; do sleep 2; done
# no tlsv1.2 support in trusty: - while ! curl -v -k --tlsv1.2 https://rp-test:8080; do sleep 2; done
- while ! curl -k https://op-test:60000 >/dev/null; do sleep 2; done
# make the SSL certs of the OP test tool and instance trusted for headless Chrome
- mkdir -p $HOME/.pki/nssdb
- certutil -d sql:$HOME/.pki/nssdb -N --empty-password
- certutil -d sql:$HOME/.pki/nssdb -A -t TC -n op -i $TRAVIS_BUILD_DIR/docker/op/cert.pem
- certutil -d sql:$HOME/.pki/nssdb -A -t TC -n op-test -i $TRAVIS_BUILD_DIR/docker/op_test/cert.pem
# start a fresh new Chrome instance
- google-chrome-stable
--user-data-dir=$(mktemp -d)
--no-sandbox
--no-first-run
--headless
--disable-extensions
--disable-gpu
--remote-debugging-port=9222
--ignore-certificate-errors
about:blank &
# wait for Chrome to start up
- while ! curl http://localhost:9222 >/dev/null; do sleep 1; done
script:
- cd $TRAVIS_BUILD_DIR/../oidc-provider-conformance-tests
- export ISSUER=https://op:4433
- npm i -g concurrently@5
- concurrently -- "npm:code" "npm:id_token"
- concurrently -- "npm:id_token+token" "npm:code+id_token"
- concurrently -- "npm:code+id_token+token" "npm:code+token"
- cd $TRAVIS_BUILD_DIR/../openid-client-conformance-tests
- export ISSUER=https://rp-test:8080
- export NODE_TLS_REJECT_UNAUTHORIZED=0
- npm run test
env:
global:
- TEST_PORT=60003
- TEST_HOSTNAME=op-test
- TEST_PROTOCOL=https
- TAG=default
- NODE_TLS_REJECT_UNAUTHORIZED=0