Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 7 additions & 13 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ on:
push:
branches:
- master
paths:
- 'src/main/**'
- 'build.gradle'
- 'settings.gradle'
- 'gradle/**'
- 'gradlew'
- 'Dockerfile'

permissions:
contents: read
Expand All @@ -20,19 +27,6 @@ jobs:
- name: Checkout
uses: actions/checkout@v7

- name: Set up Java 17
uses: actions/setup-java@v5
with:
distribution: temurin
java-version: 17
cache: gradle

- name: Grant execute permission for Gradle
run: chmod +x gradlew

- name: Run tests
run: ./gradlew test

- name: Set image metadata
id: meta
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ jobs:
run: chmod +x gradlew

- name: Build with Gradle
run: ./gradlew build
run: ./gradlew build # runs 'check' test, which runs unit and integration tests
56 changes: 48 additions & 8 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,28 +15,41 @@ java {
}
}

sourceSets {
integrationTest {
java.srcDir 'src/integrationTest/java'
resources.srcDir 'src/integrationTest/resources'

compileClasspath += sourceSets.main.output
runtimeClasspath += sourceSets.main.output
}
}

configurations {
compileOnly {
extendsFrom annotationProcessor
}
compileOnly {
extendsFrom annotationProcessor
}

integrationTestImplementation.extendsFrom testImplementation
integrationTestRuntimeOnly.extendsFrom testRuntimeOnly
}

ext {
set('springCloudVersion', '2025.1.0')
}

dependencies {
implementation 'org.springframework.boot:spring-boot-starter-webmvc'
implementation 'org.springframework.boot:spring-boot-starter-data-mongodb'
implementation 'org.springframework.boot:spring-boot-starter-security'
implementation 'org.springframework.boot:spring-boot-starter-webmvc'
implementation 'org.springframework.boot:spring-boot-starter-actuator'
implementation 'org.springframework.boot:spring-boot-starter-validation'
implementation 'org.springframework.boot:spring-boot-starter-amqp'
implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:3.0.3'
implementation 'io.jsonwebtoken:jjwt-api:0.13.0'
implementation 'org.mapstruct:mapstruct:1.6.3'
implementation 'org.mapstruct:mapstruct-processor:1.6.3'
implementation 'com.fasterxml.jackson.core:jackson-databind'
implementation 'org.springframework.boot:spring-boot-starter-amqp'
implementation 'com.github.enzobbom:ts-events:v1.0.0'
implementation 'com.github.enzobbom:ts-api-contract:v1.1.0'

Expand All @@ -46,13 +59,24 @@ dependencies {
annotationProcessor 'org.mapstruct:mapstruct-processor:1.6.3'
annotationProcessor 'org.projectlombok:lombok-mapstruct-binding:0.2.0'

runtimeOnly 'io.jsonwebtoken:jjwt-impl:0.13.0'
runtimeOnly 'io.jsonwebtoken:jjwt-jackson:0.13.0'

testImplementation 'org.springframework.boot:spring-boot-starter-webmvc-test'
testImplementation 'org.springframework.boot:spring-boot-starter-webflux-test'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'org.springframework.boot:spring-boot-starter-data-mongodb-test'
testImplementation 'org.springframework.boot:spring-boot-starter-security-test'
testImplementation 'org.springframework.boot:spring-boot-starter-webmvc-test'
testImplementation 'org.springframework.boot:spring-boot-testcontainers'
testImplementation 'org.junit.jupiter:junit-jupiter'
testImplementation 'org.mockito:mockito-core'
testImplementation 'org.mockito:mockito-junit-jupiter'
testImplementation 'org.testcontainers:testcontainers-junit-jupiter'
testImplementation 'org.testcontainers:testcontainers-mongodb'
testImplementation 'org.testcontainers:testcontainers-rabbitmq'
testImplementation 'org.assertj:assertj-core'

testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
runtimeOnly 'io.jsonwebtoken:jjwt-impl:0.13.0'
runtimeOnly 'io.jsonwebtoken:jjwt-jackson:0.13.0'
}

dependencyManagement {
Expand All @@ -69,6 +93,22 @@ tasks.named('test') {
useJUnitPlatform()
}

tasks.register('integrationTest', Test) {
description = 'Runs integration tests.'
group = 'verification'

testClassesDirs = sourceSets.integrationTest.output.classesDirs
classpath = sourceSets.integrationTest.runtimeClasspath

useJUnitPlatform()

shouldRunAfter tasks.test
}

tasks.named('check') {
dependsOn tasks.named('integrationTest')
}

sonarqube {
properties {
property 'sonar.projectKey', 'task'
Expand Down
Loading