Create CI #78

Merged
flecomte merged 4 commits from action into master 2021-03-24 19:12:41 +01:00
17 changed files with 14 additions and 12 deletions
Showing only changes of commit f458d7b674 - Show all commits

No files matched your search

+1 -1
View File
@@ -11,7 +11,7 @@
<driver-ref>postgresql</driver-ref>
<synchronize>true</synchronize>
<jdbc-driver>org.postgresql.Driver</jdbc-driver>
<jdbc-url>jdbc:postgresql://localhost:5433/test</jdbc-url>
<jdbc-url>jdbc:postgresql://localhost:15432/test</jdbc-url>
</data-source>
<data-source source="LOCAL" name="sonar@localhost" uuid="ee78beab-120d-4740-ad21-d4d9e2121d25">
<driver-ref>postgresql</driver-ref>
+13 -11
View File
@@ -71,7 +71,7 @@ val migration by tasks.registering {
dependsOn(tasks.named("composeUp"))
doLast {
val config = ConfigFactory.parseFile(file("$buildDir/../src/main/resources/application.conf")).resolve()
val config = ConfigFactory.parseFile(file("$buildDir/resources/main/application.conf")).resolve()
val connection = Connection(
host = config.getString("db.host"),
port = config.getInt("db.port"),
@@ -81,8 +81,8 @@ val migration by tasks.registering {
)
Migrations(
connection,
file("$buildDir/../src/main/resources/sql/migrations").toURI(),
file("$buildDir/../src/main/resources/sql/functions").toURI()
file("$buildDir/resources/main/sql/migrations").toURI(),
file("$buildDir/resources/main/sql/functions").toURI()
).run {
run()
}
@@ -94,7 +94,7 @@ val migrationTest by tasks.registering {
dependsOn(tasks.named("testComposeUp"))
finalizedBy(tasks.named("testComposeDown"))
doLast {
val config = ConfigFactory.parseFile(file("$buildDir/../src/test/resources/application-test.conf")).resolve()
val config = ConfigFactory.parseFile(file("$buildDir/resources/test/application-test.conf")).resolve()
val connection = Connection(
host = config.getString("db.host"),
port = config.getInt("db.port"),
@@ -104,8 +104,8 @@ val migrationTest by tasks.registering {
)
Migrations(
connection,
file("$buildDir/../src/main/resources/sql/migrations").toURI(),
file("$buildDir/../src/main/resources/sql/functions").toURI()
file("$buildDir/resources/main/sql/migrations").toURI(),
file("$buildDir/resources/main/sql/functions").toURI()
).run {
run()
connection.disconnect()
@@ -115,11 +115,13 @@ val migrationTest by tasks.registering {
val testSql by tasks.registering {
group = "verification"
dependsOn(tasks.named("processResources"))
dependsOn(tasks.named("processTestResources"))
dependsOn(tasks.named("testComposeUp"))
finalizedBy(tasks.named("testComposeDown"))
doLast {
val config = ConfigFactory.parseFile(file("$buildDir/../src/test/resources/application-test.conf")).resolve()
val config = ConfigFactory.parseFile(file("$buildDir/resources/test/application-test.conf")).resolve()
val connection = Connection(
host = config.getString("db.host"),
@@ -131,16 +133,16 @@ val testSql by tasks.registering {
Migrations(
connection,
file("$buildDir/../src/main/resources/sql/migrations").toURI(),
file("$buildDir/../src/main/resources/sql/functions").toURI(),
file("$buildDir/../src/test/sql/fixtures").toURI()
file("$buildDir/resources/main/sql/migrations").toURI(),
file("$buildDir/resources/main/sql/functions").toURI(),
file("$buildDir/resources/test/sql/fixtures").toURI()
).run {
run()
}
Requester.RequesterFactory(
connection = connection,
queriesDirectory = file("$buildDir/../src/test/sql").toURI()
queriesDirectory = file("$buildDir/resources/test/sql").toURI()
).createRequester().run {
getQueries().map {
try {
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.