-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (45 loc) · 1.51 KB
/
tests.yaml
File metadata and controls
53 lines (45 loc) · 1.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
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: |
if [ -n "${{ secrets.APPLICATION_TEST_PROPERTIES }}" ]; then
printf '%s' "${{ secrets.APPLICATION_TEST_PROPERTIES }}" | base64 -d >> src/test/resources/application-test.properties
fi
echo "spring.sql.init.mode=never" >> src/test/resources/application-test.properties
- name: Prepare Docker .env for CI tests
run: |
printf '%s\n' \
"POSTGRES_USER=${{ secrets.POSTGRES_USER }}" \
"POSTGRES_PASSWORD=${{ secrets.POSTGRES_PASSWORD }}" \
"POSTGRES_DB=${{ secrets.POSTGRES_DB }}" \
"POSTGRES_PORT=${{ secrets.POSTGRES_PORT }}" > .env
- name: Install Docker Compose
run: |
sudo apt-get update
sudo apt-get install -y docker-compose
- name: Run unit and integration tests
run: ./mvnw clean verify