Skip to content

Commit 6cbf37d

Browse files
authored
Merge pull request #715 from javiertuya/714-multiple-jdks
Build multiple JDKs and junit test reports
2 parents 39cfd6e + b8772e3 commit 6cbf37d

File tree

1 file changed

+34
-14
lines changed

1 file changed

+34
-14
lines changed

.github/workflows/main.yml

Lines changed: 34 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,26 +10,46 @@ on:
1010
- master
1111
jobs:
1212
build:
13+
strategy:
14+
matrix:
15+
version: [8, 11, 17, 21, 23]
16+
fail-fast: false
1317
runs-on: ubuntu-latest
1418
steps:
15-
- uses: actions/checkout@v3
19+
- uses: actions/checkout@v4
1620

17-
- name: Setting up JDK8
18-
uses: actions/setup-java@v3
21+
- name: Setting up JDK ${{ matrix.version }}
22+
uses: actions/setup-java@v4
1923
with:
20-
java-version: '8'
21-
distribution: 'adopt'
22-
23-
- name: Install Docker Compose
24-
run: |
25-
sudo apt-get update
26-
sudo apt-get install -y docker-compose
27-
24+
java-version: "${{ matrix.version }}"
25+
distribution: 'temurin'
26+
cache: 'maven'
27+
2828
- name: Running Kafka
29-
run: docker-compose -f docker/compose/kafka-schema-registry.yml up -d && sleep 10
29+
run: docker compose -f docker/compose/kafka-schema-registry.yml up -d && sleep 10
3030

3131
- name: Running PostgreSQL (to test DB SQL Executor)
32-
run: docker-compose -f docker/compose/pg_compose.yml up -d
32+
run: docker compose -f docker/compose/pg_compose.yml up -d
3333

3434
- name: Building and testing the changes
35-
run: mvn clean test
35+
run: mvn clean test -ntp
36+
37+
- if: always()
38+
name: Junit html report
39+
uses: javiertuya/junit-report-action@v1.3.0
40+
with:
41+
surefire-files: "**/target/surefire-reports/TEST-*.xml"
42+
report-dir: target/reports
43+
44+
- if: always()
45+
name: Interactive and granular reports
46+
run: cp core/target/*.html target/reports/ && cp core/target/*.csv target/reports/
47+
48+
- if: always()
49+
name: Publish test report files
50+
uses: actions/upload-artifact@v4.6.2
51+
with:
52+
name: "test-report-java${{ matrix.version }}"
53+
path: |
54+
target/reports
55+
!target/reports/someFileName.html

0 commit comments

Comments
 (0)