From 7548ca64d0f307123c9d2bbc6034e64ec8321c7c Mon Sep 17 00:00:00 2001 From: atusa17 Date: Sun, 17 Mar 2019 16:01:12 -0600 Subject: [PATCH] PAN-52 Updated the build.gradle files and the .travis.yml --- .travis.yml | 18 ++++++++++++------ persistence/build.gradle | 8 ++++++++ 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index 5be1637..658d4f9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -30,13 +30,19 @@ stages: jobs: include: - - stage: Load Database + - stage: "Load Database" script: ./gradlew loaddb - - stage: Build + - stage: "Build" script: ./gradlew build - - stage: Unit Tests + - stage: "Unit Tests" script: ./gradlew test - - stage: Integration Tests - script: ./gradlew integrationTest - - stage: Sonar Analysis + - stage: "Integration Tests" + script: + - | + ./gradlew :persistence:startPersistenceApi & + APP_PID=$! + - | + ./gradlew integrationTest + - kill $APP_PID + - stage: "Sonar Analysis" script: ./gradlew sonar diff --git a/persistence/build.gradle b/persistence/build.gradle index b832e7e..811725d 100644 --- a/persistence/build.gradle +++ b/persistence/build.gradle @@ -50,3 +50,11 @@ task loadDb(type: Exec, group: 'Verification', description: 'Reloads the local d commandLine=['cmd','/c','loaddb.bat'] } } + +task startPersistenceApi(type: JavaExec, description: 'Starts the Persistence API') { + dependsOn 'loadDb' + dependsOn 'build' + classpath = files('build/libs/persistence-1.0.jar') + classpath += sourceSets.main.runtimeClasspath + main = 'edu.msudenver.tsp.persistence.PersistenceApi' +}