From 2d3bbe95e1257a235e361c280bb7009cd5be6f4e Mon Sep 17 00:00:00 2001 From: TyostoKarry <114697841+TyostoKarry@users.noreply.github.com> Date: Fri, 17 Oct 2025 15:18:23 +0300 Subject: [PATCH 1/2] Add GitHub Actions workflow for PR verification - Added .github/workflows/verify-pr.yml - Runs Ktlint check, tests, and assemble on pull requests to main. - Configured JDK 21 and Gradle caching for faster builds. --- .github/workflows/verify-pr.yml | 38 +++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/verify-pr.yml diff --git a/.github/workflows/verify-pr.yml b/.github/workflows/verify-pr.yml new file mode 100644 index 0000000..fe58e87 --- /dev/null +++ b/.github/workflows/verify-pr.yml @@ -0,0 +1,38 @@ +name: Verify Pull Request + +on: + pull_request: + branches: + - main + +jobs: + verify: + name: Verify PR Changes + runs-on: ubuntu-latest + timeout-minutes: 10 + + steps: + - name: Checkout repository + uses: actions/checkout@v5 + + - name: Validate Gradle wrapper + uses: gradle/actions/wrapper-validation@v5 + + - name: Setup JDK + uses: actions/setup-java@v5 + with: + distribution: "temurin" + java-version: "21" + cache: gradle + + - name: Grant execute permissions for Gradle + run: chmod +x gradlew + + - name: Run Ktlint check + run: ./gradlew ktlintCheck --no-daemon + + - name: Run tests + run: ./gradlew test --no-daemon + + - name: Assemble project + run: ./gradlew clean assemble --no-daemon From a19718bfe326f53863ae0f8433b17b001d0d772f Mon Sep 17 00:00:00 2001 From: TyostoKarry <114697841+TyostoKarry@users.noreply.github.com> Date: Fri, 17 Oct 2025 15:19:47 +0300 Subject: [PATCH 2/2] Fix Ktlint issues in tests and update .gitignore - Resolved Ktlint violations in test/ folder for CI compliance. - Added eventshuffle.db to .gitignore under Databases section. --- .gitignore | 3 +++ .../eventshuffle/EventshuffleApplicationTests.kt | 7 ++----- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 5a979af..2194997 100644 --- a/.gitignore +++ b/.gitignore @@ -38,3 +38,6 @@ out/ ### Kotlin ### .kotlin + +### Databases ### +eventshuffle.db \ No newline at end of file diff --git a/src/test/kotlin/io/github/tyostokarry/eventshuffle/EventshuffleApplicationTests.kt b/src/test/kotlin/io/github/tyostokarry/eventshuffle/EventshuffleApplicationTests.kt index 6490919..ba2e554 100644 --- a/src/test/kotlin/io/github/tyostokarry/eventshuffle/EventshuffleApplicationTests.kt +++ b/src/test/kotlin/io/github/tyostokarry/eventshuffle/EventshuffleApplicationTests.kt @@ -5,9 +5,6 @@ import org.springframework.boot.test.context.SpringBootTest @SpringBootTest class EventshuffleApplicationTests { - - @Test - fun contextLoads() { - } - + @Test + fun contextLoads() {} }