Skip to content

feat(tests): add GitHub Actions workflow for running tests #2

feat(tests): add GitHub Actions workflow for running tests

feat(tests): add GitHub Actions workflow for running tests #2

Workflow file for this run

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: Run unit and integration tests
run: ./mvnw clean verify