PAN-6 Added the loadDb task to the build pipeline for Travis

This commit is contained in:
2019-02-10 12:16:58 -07:00
parent e28bf8cda4
commit 1e77a38483
4 changed files with 9 additions and 6 deletions
+7 -4
View File
@@ -18,15 +18,18 @@ before_script:
- mysql -u root pandamonium < pandamonium-theorem-prover/persistence/sql/local_development.sql - mysql -u root pandamonium < pandamonium-theorem-prover/persistence/sql/local_development.sql
stages: stages:
- name: load database
- name: build - name: build
- name: unitTest - name: unit Test
- name: integrationTest - name: integration Test
jobs: jobs:
include: include:
- stage: load database
script: ./pandamonium-theorem-prover/gradlew loaddb
- stage: build - stage: build
script: ./pandamonium-theorem-prover/gradlew build script: ./pandamonium-theorem-prover/gradlew build
- stage: unitTest - stage: unit Test
script: ./pandamonium-theorem-prover/gradlew test script: ./pandamonium-theorem-prover/gradlew test
- stage: integrationTest - stage: integration Test
script: ./pandamonium-theorem-prover/gradlew integrationTest script: ./pandamonium-theorem-prover/gradlew integrationTest
@@ -28,6 +28,6 @@ dependencies {
} }
task loadDb(type: Exec, group: 'Verification', description: 'Reloads the local database.') { task loadDb(type: Exec, group: 'Verification', description: 'Reloads the local database.') {
workingDir "$rootDir/scripts/mysql" workingDir "./scripts/mysql"
commandLine './loaddb.sh' commandLine './loaddb.sh'
} }
@@ -1,7 +1,7 @@
#!/usr/bin/env bash #!/usr/bin/env bash
export MYSQL_PWD=secret export MYSQL_PWD=secret
for sqlScript in $( find ../../ -name "*.sql" -print | sort); for sqlScript in $( find . -name "*.sql" -print | sort);
do do
echo "**** $sqlScript ****" echo "**** $sqlScript ****"
mysql --batch --quick --raw --line-numbers --force --user=panda < $sqlScript mysql --batch --quick --raw --line-numbers --force --user=panda < $sqlScript