-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy path.travis.yml
46 lines (45 loc) · 1.51 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
dist: trusty
sudo: required
language: node_js
node_js:
- "8"
services:
- mysql
addons:
apt:
sources:
- mysql-5.7-trusty
packages:
- mysql-server
- mysql-client
env:
global:
- ABSTRACTION_DB_USER=travis
- SAML_CALLBACK_URL=http://localhost:3000/auth/login/callback
- SAML_ENTRY_POINT=http://localhost:8080/simplesaml/saml2/idp/SSOService.php
- ISSUER=http://app.example.com
- SAML_SUCCESS_URL=http://localhost:5000/
cache:
directories:
- "backend/node_modules"
- "frontend/node_modules"
before_install:
# Setup MySQL
- sudo mysql -e "use mysql; update user set authentication_string=PASSWORD('') where User='root'; update user set plugin='mysql_native_password';FLUSH PRIVILEGES;"
- sudo mysql_upgrade
- sudo service mysql restart
# Create MySQL Test Database
- mysql -e 'CREATE DATABASE IF NOT EXISTS test;'
- mysql -e 'ALTER DATABASE test CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci;'
# Install Yarn
- curl -o- -L https://yarnpkg.com/install.sh | bash -s --
- export PATH="$HOME/.yarn/bin:$PATH"
# Install npm Packages
- cd frontend && yarn install && cd ..
- cd backend && npm install && cd ..
# Install Certs
- cd backend && mkdir keys && cd ..
- cd backend && curl https://raw.githubusercontent.com/kristophjunge/docker-test-saml-idp/master/config/simplesamlphp/server.crt > keys/idp_cert.pem && cd ..
- cd backend && npm run keygen && cd ..
script:
- cd backend && npm test && npm run lint && cd ../frontend && yarn test && cd ..