summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul-Christian Volkmer2023-08-10 16:44:26 +0200
committerPaul-Christian Volkmer2023-08-10 17:27:14 +0200
commitb956eba6c746e511028e257ae102164867c70766 (patch)
treeb7b9f03f2cbb23b858eb7f9ea9665f2bc170e60b
parent002b0618cf813d48bbff2d287e16f607a4c73d73 (diff)
Add workflow to run tests on push or pull request
-rw-r--r--.github/workflows/test.yml28
-rw-r--r--build.gradle.kts11
2 files changed, 39 insertions, 0 deletions
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
new file mode 100644
index 0000000..5ff199b
--- /dev/null
+++ b/.github/workflows/test.yml
@@ -0,0 +1,28 @@
+name: "Run Tests"
+
+on:
+ push:
+ branches:
+ - 'master'
+ pull-request:
+ branches:
+ - '*'
+
+jobs:
+ docker:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v3
+ - uses: actions/setup-java@v3
+ with:
+ java-version: '17'
+ distribution: 'temurin'
+
+ - name: Setup Gradle
+ uses: gradle/gradle-build-action@v2
+
+ - name: Execute tests
+ run: ./gradlew test
+
+ - name: Execute integration tests
+ run: ./gradlew integrationTest \ No newline at end of file
diff --git a/build.gradle.kts b/build.gradle.kts
index 1f1a123..7650575 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -1,5 +1,6 @@
import org.gradle.api.tasks.testing.logging.TestLogEvent
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
+import org.springframework.boot.gradle.tasks.bundling.BootBuildImage
plugins {
war
@@ -90,3 +91,13 @@ task<Test>("integrationTest") {
shouldRunAfter("test")
}
+
+tasks.named<BootBuildImage>("bootBuildImage") {
+ imageName.set("ghcr.io/ccc-mf/etl-processor")
+
+ environment.set(environment.get() + mapOf(
+ "BP_OCI_SOURCE" to "https://github.com/CCC-MF/etl-processor",
+ "BP_OCI_LICENSES" to "AGPLv3",
+ "BP_OCI_DESCRIPTION" to "ETL Processor for bwHC MTB files"
+ ))
+}