This repository was archived by the owner on Feb 3, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (57 loc) · 1.61 KB
/
test.yml
File metadata and controls
60 lines (57 loc) · 1.61 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
54
55
56
57
58
59
60
name: Test
on:
push:
branches:
- '*'
pull_request:
branches:
- '*'
workflow_dispatch:
env:
GRADLE_OPTS: -Dorg.gradle.daemon=false
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
fetch-depth: 0 # Full history for SonarCloud
- name: Set up JDK 21
uses: actions/setup-java@v5
with:
java-version: '21'
distribution: 'microsoft'
cache: 'gradle'
cache-dependency-path: |
conversational-ai4j-*/*.gradle*
conversational-ai4j-*/**/gradle-wrapper.properties
- name: Cache Sonar packages
uses: actions/cache@v5
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar
- name: Run tests
run: ./gradlew test jacocoTestReport sonar --continue --info
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
- name: Publish Test Results
if: always()
uses: dorny/test-reporter@v2
with:
name: 'Test Results'
path: '**/build/test-results/test/*.xml'
reporter: 'java-junit'
fail-on-error: false
docker-build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build Docker image
run: docker build --no-cache -t conversationalai4j-test .
- name: Verify Docker image
run: docker images conversationalai4j-test