From 2180651831beb20bfd97d9b5b4800545fbe9be39 Mon Sep 17 00:00:00 2001 From: Miuroro Date: Wed, 17 Jun 2026 14:28:58 +0200 Subject: [PATCH 1/2] ci: enabled automated testing for pull requests --- .github/workflows/ci.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d8fce3e..43d6038 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,6 +21,5 @@ jobs: distribution: 'temurin' cache: 'maven' - - name: Build with Maven - # im using -DskipTests for now the DB environment variables aren't on GitHub runner yet - run: mvn clean package -DskipTests \ No newline at end of file + - name: Build and test with Maven + run: mvn clean verify \ No newline at end of file From 1dcf509c66ef2c97704f4c0621529020322c5b22 Mon Sep 17 00:00:00 2001 From: Miuroro Date: Wed, 17 Jun 2026 14:49:33 +0200 Subject: [PATCH 2/2] chor: updated emailservice and added @PostConstruct to run after all dependencies are injected in ci --- .../tickettrackingsystem/service/EmailService.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/net/hackyourfuture/tickettrackingsystem/service/EmailService.java b/src/main/java/net/hackyourfuture/tickettrackingsystem/service/EmailService.java index 3202c42..3a5eb4a 100644 --- a/src/main/java/net/hackyourfuture/tickettrackingsystem/service/EmailService.java +++ b/src/main/java/net/hackyourfuture/tickettrackingsystem/service/EmailService.java @@ -1,5 +1,6 @@ package net.hackyourfuture.tickettrackingsystem.service; +import jakarta.annotation.PostConstruct; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Value; @@ -14,12 +15,13 @@ public class EmailService { private static final Logger logger = LoggerFactory.getLogger(EmailService.class); - private final RestClient restClient; + private RestClient restClient; @Value("${resend.api.key}") private String apiKey; - public EmailService() { + @PostConstruct + public void init() { this.restClient = RestClient.builder() .baseUrl("https://api.resend.com") .build();