diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml new file mode 100644 index 0000000..60e2234 --- /dev/null +++ b/.github/workflows/tests.yaml @@ -0,0 +1,53 @@ +on: + push: + branches: + - '**' + pull_request: + types: [opened, synchronize, reopened] + +permissions: + contents: read + +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