-
-
Notifications
You must be signed in to change notification settings - Fork 10
/
.travis.yml
43 lines (43 loc) · 1.54 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
language: java
sudo: required
services:
- mysql
jdk:
- oraclejdk8
env:
matrix:
- CFENGINE=lucee@5 DB=MySQL DBCLASS=org.gjt.mm.mysql.Driver
before_install:
# Get Commandbox
- sudo apt-key adv --keyserver keys.gnupg.net --recv 6DA70622
- sudo echo "deb http://downloads.ortussolutions.com/debs/noarch /" | sudo tee -a /etc/apt/sources.list.d/commandbox.list
install:
# Install Commandbox
- sudo apt-get update && sudo apt-get --assume-yes install commandbox
# Install Wheels CLI
- box version
- box install cfwheels-cli
# Install CFConfig
- box install commandbox-cfconfig
# Install CFWheels Example App from git master
- box install cfwheels/cfwheels-example-app
before_script:
# Create database
- if [[ "$DB" == "MySQL" ]]; then mysql -e 'CREATE DATABASE exampleapp;'; fi
# Start The Server
- box server start
# Add the datasource via CFConfig
- if [[ "$DB" == "MySQL" ]]; then box cfconfig datasource save name=exampleapp database=exampleapp dbdriver=$DB class="$DBCLASS" host=127.0.0.1 port=3306 username=travis password=""; fi
# CFConfig seems to require a server restart to register the DB
- box server restart
# Basically, we now run the wheels CLI test runner, pointing it to the current server
- box cfconfig datasource list
# Double check servername?
- box server list
# Run DB Migrations
script: >
testResults="$(box wheels test type=app servername=exampleapp)";
echo "$testResults";
if ! grep -i "\Tests Complete: All Good!" <<< $testResults; then exit 1; fi
notifications:
email: false