Skip to content

Commit f9c184c

Browse files
authored
Merge pull request #33 from aether-framework/feature/e2e-and-it-tests
Add integration tests for migration and transformation scenarios
2 parents bbc1a0c + 84061d0 commit f9c184c

9 files changed

Lines changed: 2138 additions & 46 deletions

File tree

Lines changed: 73 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
name: CI
1+
name: CI (pull_request)
22

33
on:
4-
push:
5-
branches: [ main, develop, 'feature/**' ]
64
pull_request:
75
branches: [ main, develop ]
86

@@ -36,33 +34,52 @@ jobs:
3634
- name: Build and test with Maven
3735
run: mvn -B clean verify -Pqa -Ddependency-check.skip=true
3836

39-
- name: Upload test results
37+
# Upload XMLs ONLY once (Java 21) so the report doesn't double-count
38+
- name: Upload unit test XMLs (Java 21 only)
4039
uses: actions/upload-artifact@v4
41-
if: always()
40+
if: always() && matrix.java == '21'
4241
with:
43-
name: test-results-java-${{ matrix.java }}
42+
name: unit-xml
4443
path: |
45-
**/target/surefire-reports/
46-
**/target/failsafe-reports/
44+
**/target/surefire-reports/TEST-*.xml
45+
**/target/*-reports/TEST-*.xml
4746
retention-days: 7
4847

49-
- name: Upload coverage report
48+
integration-tests:
49+
name: Integration & E2E Tests (Java ${{ matrix.java }})
50+
runs-on: ubuntu-latest
51+
needs: build
52+
strategy:
53+
fail-fast: false
54+
matrix:
55+
java: [ '17', '21' ]
56+
57+
steps:
58+
- name: Checkout repository
59+
uses: actions/checkout@v4
60+
with:
61+
fetch-depth: 1
62+
63+
- name: Set up JDK ${{ matrix.java }}
64+
uses: actions/setup-java@v4
65+
with:
66+
java-version: ${{ matrix.java }}
67+
distribution: 'temurin'
68+
cache: 'maven'
69+
70+
- name: Run integration tests
71+
run: mvn -B clean verify -Pit -Ddependency-check.skip=true
72+
73+
# Upload XMLs ONLY once (Java 21) so the report doesn't double-count
74+
- name: Upload IT test XMLs (Java 21 only)
5075
uses: actions/upload-artifact@v4
51-
if: matrix.java == '21'
76+
if: always() && matrix.java == '21'
5277
with:
53-
name: coverage-report
78+
name: it-xml
5479
path: |
55-
**/target/site/jacoco/
56-
**/target/jacoco.exec
80+
**/target/failsafe-reports/TEST-*.xml
5781
retention-days: 7
5882

59-
- name: Publish Test Report
60-
uses: mikepenz/action-junit-report@v4
61-
if: always()
62-
with:
63-
report_paths: '**/target/*-reports/TEST-*.xml'
64-
check_name: Test Report (Java ${{ matrix.java }})
65-
6683
quality:
6784
name: Code Quality Analysis
6885
runs-on: ubuntu-latest
@@ -81,32 +98,14 @@ jobs:
8198
distribution: 'temurin'
8299
cache: 'maven'
83100

84-
- name: Install artifacts for analysis
101+
- name: Install artifacts for analysis (skip tests)
85102
run: mvn -B -Ddependency-check.skip=true clean install -Pqa -DskipTests
86103

87104
- name: Run SpotBugs analysis
88105
run: mvn -B spotbugs:check -Pqa -Ddependency-check.skip=true
89-
continue-on-error: true
90106

91107
- name: Run Checkstyle analysis
92108
run: mvn -B checkstyle:check -Pqa -Ddependency-check.skip=true
93-
continue-on-error: true
94-
95-
- name: Upload SpotBugs report
96-
uses: actions/upload-artifact@v4
97-
if: always()
98-
with:
99-
name: spotbugs-report
100-
path: '**/target/spotbugsXml.xml'
101-
retention-days: 7
102-
103-
- name: Upload Checkstyle report
104-
uses: actions/upload-artifact@v4
105-
if: always()
106-
with:
107-
name: checkstyle-report
108-
path: '**/target/checkstyle-result.xml'
109-
retention-days: 7
110109

111110
dependency-check:
112111
name: OWASP Dependency Check
@@ -136,13 +135,41 @@ jobs:
136135
137136
- name: Run OWASP Dependency Check
138137
run: mvn -B dependency-check:aggregate -Pqa
139-
continue-on-error: true
140138

141-
- name: Upload Dependency Check report
142-
uses: actions/upload-artifact@v4
139+
reports:
140+
name: Test Reports
141+
runs-on: ubuntu-latest
142+
needs: [ build, integration-tests ]
143+
if: always()
144+
145+
permissions:
146+
contents: read
147+
checks: write
148+
pull-requests: write
149+
150+
steps:
151+
- name: Download unit XMLs (Java 21 only)
152+
uses: actions/download-artifact@v4
153+
with:
154+
name: unit-xml
155+
path: reports/unit
156+
157+
- name: Download IT XMLs (Java 21 only)
158+
uses: actions/download-artifact@v4
159+
with:
160+
name: it-xml
161+
path: reports/it
162+
163+
- name: Publish Unit Test Report
164+
uses: mikepenz/action-junit-report@v4
143165
if: always()
144166
with:
145-
name: dependency-check-report
146-
path: |
147-
target/dependency-check-report.html
148-
retention-days: 30
167+
report_paths: 'reports/unit/**/TEST-*.xml'
168+
check_name: Unit Test Report
169+
170+
- name: Publish IT Test Report
171+
uses: mikepenz/action-junit-report@v4
172+
if: always()
173+
with:
174+
report_paths: 'reports/it/**/TEST-*.xml'
175+
check_name: IT Test Report

.github/workflows/ci-push.yml

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
name: CI (push)
2+
3+
on:
4+
push:
5+
branches: [ main, develop, 'feature/**' ]
6+
7+
permissions:
8+
contents: read
9+
checks: write
10+
11+
jobs:
12+
build:
13+
name: Build & Test (Java ${{ matrix.java }})
14+
runs-on: ubuntu-latest
15+
strategy:
16+
fail-fast: false
17+
matrix:
18+
java: [ '17', '21' ]
19+
20+
steps:
21+
- name: Checkout repository
22+
uses: actions/checkout@v4
23+
with:
24+
fetch-depth: 1
25+
26+
- name: Set up JDK ${{ matrix.java }}
27+
uses: actions/setup-java@v4
28+
with:
29+
java-version: ${{ matrix.java }}
30+
distribution: 'temurin'
31+
cache: 'maven'
32+
33+
- name: Build and test with Maven
34+
run: mvn -B clean verify -Pqa -Ddependency-check.skip=true
35+
36+
- name: Upload unit test XMLs
37+
uses: actions/upload-artifact@v4
38+
if: always()
39+
with:
40+
name: unit-xml-java-${{ matrix.java }}
41+
path: |
42+
**/target/surefire-reports/TEST-*.xml
43+
**/target/*-reports/TEST-*.xml
44+
retention-days: 7
45+
46+
unit-report:
47+
name: Unit Test Report
48+
runs-on: ubuntu-latest
49+
needs: build
50+
if: always()
51+
52+
permissions:
53+
contents: read
54+
checks: write
55+
56+
steps:
57+
- name: Download unit XMLs (all Java versions)
58+
uses: actions/download-artifact@v4
59+
with:
60+
pattern: unit-xml-java-*
61+
merge-multiple: true
62+
path: reports/unit
63+
64+
- name: Publish Unit Test Report
65+
uses: mikepenz/action-junit-report@v4
66+
if: always()
67+
with:
68+
report_paths: 'reports/unit/**/TEST-*.xml'
69+
check_name: Unit Test Report

0 commit comments

Comments
 (0)