From 17f48397a75d86074f295fdc93451831c606406e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20Leb=C3=A8gue?= Date: Wed, 1 Apr 2026 16:12:04 +0200 Subject: [PATCH 1/2] feat(tests): add GitHub Actions workflow for running tests --- .github/workflows/tests.yaml | 50 ++++++++++++++++++++++++++++++++++++ pom.xml | 7 ++--- 2 files changed, 54 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/tests.yaml diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml new file mode 100644 index 0000000..5353279 --- /dev/null +++ b/.github/workflows/tests.yaml @@ -0,0 +1,50 @@ +on: + push: + branches: + - '**' + pull_request: + types: [opened, synchronize, reopened] + +name: Tests +jobs: + tests: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Set up JDK 25 + uses: actions/setup-java@v4 + with: + distribution: "temurin" + java-version: 25 + overwrite-settings: false + + - name: Cache Maven packages + uses: actions/cache@v4 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: ${{ runner.os }}-maven + + - name: Prepare test properties + run: | + mkdir -p src/test/resources + echo ${{ secrets.APPLICATION_TEST_PROPERTIES }} | base64 -d > src/test/resources/application-test.properties + echo "spring.sql.init.mode=never" >> src/test/resources/application-test.properties + + - name: Prepare Docker .env for CI tests + run: | + cat > .env <org.apache.maven.plugins maven-surefire-plugin - true + + **/*IntegrationTest.java + @@ -155,8 +157,7 @@ maven-failsafe-plugin - **/*Tests.java - **/*Test.java + **/*IntegrationTest.java From 41c0fcf026fca0c5c9a0f17a2e6863cbbe0aee1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20Leb=C3=A8gue?= Date: Thu, 2 Apr 2026 11:08:37 +0200 Subject: [PATCH 2/2] feat(tests): add permissions for GitHub Actions workflow --- .github/workflows/tests.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 5353279..60e2234 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -5,6 +5,9 @@ on: pull_request: types: [opened, synchronize, reopened] +permissions: + contents: read + name: Tests jobs: tests: