feat: Add pipelines (SCRUM-44) #6
@ -9,20 +9,6 @@ jobs:
|
|||||||
runs-on: "ubuntu-latest"
|
runs-on: "ubuntu-latest"
|
||||||
container:
|
container:
|
||||||
image: "cimg/openjdk:21.0-node"
|
image: "cimg/openjdk:21.0-node"
|
||||||
services:
|
|
||||||
postgres:
|
|
||||||
image: postgres:16.4
|
|
||||||
env:
|
|
||||||
POSTGRES_DB: lf8_starter_db
|
|
||||||
POSTGRES_USER: lf8_starter
|
|
||||||
POSTGRES_PASSWORD: secret
|
|
||||||
ports:
|
|
||||||
- 5432:5432
|
|
||||||
options: >-
|
|
||||||
--health-cmd="pg_isready -U lf8_starter"
|
|
||||||
--health-interval=10s
|
|
||||||
--health-timeout=5s
|
|
||||||
--health-retries=3
|
|
||||||
steps:
|
steps:
|
||||||
- name: "Checkout"
|
- name: "Checkout"
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
@ -7,6 +7,13 @@ plugins {
|
|||||||
group = "de.szut"
|
group = "de.szut"
|
||||||
version = "0.0.1-SNAPSHOT"
|
version = "0.0.1-SNAPSHOT"
|
||||||
|
|
||||||
|
tasks.test {
|
||||||
|
useJUnitPlatform()
|
||||||
|
|
||||||
|
// Activate the 'test' profile for Spring during tests
|
||||||
|
systemProperty("spring.profiles.active", "test")
|
||||||
|
}
|
||||||
|
|
||||||
java {
|
java {
|
||||||
toolchain {
|
toolchain {
|
||||||
languageVersion = JavaLanguageVersion.of(21)
|
languageVersion = JavaLanguageVersion.of(21)
|
||||||
@ -35,6 +42,7 @@ dependencies {
|
|||||||
implementation("org.springframework.boot:spring-boot-starter-oauth2-client:3.3.4")
|
implementation("org.springframework.boot:spring-boot-starter-oauth2-client:3.3.4")
|
||||||
runtimeOnly("org.postgresql:postgresql")
|
runtimeOnly("org.postgresql:postgresql")
|
||||||
implementation("org.springdoc:springdoc-openapi-starter-webmvc-ui:2.6.0")
|
implementation("org.springdoc:springdoc-openapi-starter-webmvc-ui:2.6.0")
|
||||||
|
testImplementation("com.h2database:h2")
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.withType<Test> {
|
tasks.withType<Test> {
|
||||||
|
5
src/main/resources/application-test.properties
Normal file
5
src/main/resources/application-test.properties
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
spring.datasource.url=jdbc:h2:mem:testdb;DB_CLOSE_DELAY=-1
|
||||||
|
spring.datasource.driver-class-name=org.h2.Driver
|
||||||
|
spring.datasource.username=sa
|
||||||
|
spring.datasource.password=
|
||||||
|
spring.jpa.database-platform=org.hibernate.dialect.H2Dialect
|
0
src/test/java/application-test.properties
Normal file
0
src/test/java/application-test.properties
Normal file
@ -2,6 +2,7 @@ package de.szut.lf8_starter;
|
|||||||
|
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
import org.springframework.boot.test.context.SpringBootTest;
|
import org.springframework.boot.test.context.SpringBootTest;
|
||||||
|
import org.springframework.test.context.TestPropertySource;
|
||||||
|
|
||||||
@SpringBootTest
|
@SpringBootTest
|
||||||
class Lf8StarterApplicationTests {
|
class Lf8StarterApplicationTests {
|
||||||
|
Loading…
Reference in New Issue
Block a user