Skip to content

Instantly share code, notes, and snippets.

@neokoenig
Created March 6, 2017 18:05
Show Gist options
  • Save neokoenig/66de3fc754cda555b4550a9d92796168 to your computer and use it in GitHub Desktop.
Save neokoenig/66de3fc754cda555b4550a9d92796168 to your computer and use it in GitHub Desktop.
language: java
sudo: required
services:
- mysql
jdk:
- oraclejdk8
env:
matrix:
- CFENGINE=lucee@4 DBDRIVER=MySQL HOST=localhost PORT=3306
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 install cfwheels-cli
# Install CFConfig
- box install commandbox-cfconfig
before_script:
# Create databases
- mysql -e 'CREATE DATABASE wheelstestdb;'
# Start The Server
- box server start cfengine=$CFENGINE
# Add the datasource via CFConfig
- box cfconfig datasource save name=wheelstestdb database=wheelstestdb dbdriver=$DBDRIVER host=$HOST port=$PORT username=root blob=true clob=true
# Restart Server to refresh config
- box server restart
# Basically, we now run the wheels CLI test runner, pointing it to the current server
script: >
testResults="$(box wheels test core cfwheels )";
echo "$testResults";
if ! grep -i "\Tests Complete: All Good!" <<< $testResults; then exit 1; fi
notifications:
email: false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment