Skip to content

Commit 6b43b4d

Browse files
author
Piotr Kubicki
committed
fix(ci): improve test report handling and fix Failsafe HTML generation
- Ensure Failsafe plugin generates an HTML report like Surefire - Remove redundant Surefire report generation step - Improve artifact storage for easier access to test results
1 parent f4e0e11 commit 6b43b4d

File tree

2 files changed

+11
-44
lines changed

2 files changed

+11
-44
lines changed

.github/workflows/ci.yml

Lines changed: 11 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -25,36 +25,26 @@ jobs:
2525
java-version: '21'
2626
cache: 'maven'
2727

28-
- name: Build and Run Tests with Allure
29-
run: mvn clean verify -DtrimStackTrace=false -Dorg.slf4j.simpleLogger.defaultLogLevel=debug
28+
- name: Build and Run Tests
29+
run: mvn clean verify
3030

31-
- name: Generate Surefire and Allure Reports
32-
run: mvn site allure:report
31+
- name: Generate Surefire and Failsafe HTML Reports
32+
run: mvn surefire-report:report failsafe-report:report
3333

34-
- name: Upload Test Reports (Surefire + Allure)
34+
- name: Upload XML Test Reports (Surefire + Failsafe)
3535
if: always()
3636
uses: actions/upload-artifact@v4
3737
with:
38-
name: test-reports
38+
name: surefire-failsafe-xml-reports
3939
path: |
4040
target/surefire-reports/
4141
target/failsafe-reports/
42-
target/site/
43-
target/allure-report/
4442
retention-days: 90
4543

46-
- name: Publish Allure Report
44+
- name: Upload HTML Test Reports (Surefire + Failsafe)
4745
if: always()
48-
uses: actions/upload-pages-artifact@v3
46+
uses: actions/upload-artifact@v4
4947
with:
50-
path: target/allure-report/
51-
52-
deploy-allure:
53-
needs: build
54-
runs-on: ubuntu-latest
55-
permissions:
56-
pages: write
57-
id-token: write
58-
steps:
59-
- name: Deploy Allure Report to GitHub Pages
60-
uses: actions/deploy-pages@v4
48+
name: surefire-failsafe-html-reports
49+
path: target/site/
50+
retention-days: 90

pom.xml

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -76,11 +76,6 @@
7676
<artifactId>spring-security-test</artifactId>
7777
<scope>test</scope>
7878
</dependency>
79-
<dependency>
80-
<groupId>io.qameta.allure</groupId>
81-
<artifactId>allure-junit5</artifactId>
82-
<version>2.29.1</version>
83-
</dependency>
8479
</dependencies>
8580

8681
<build>
@@ -109,28 +104,10 @@
109104
</excludes>
110105
</configuration>
111106
</plugin>
112-
<plugin>
113-
<groupId>io.qameta.allure</groupId>
114-
<artifactId>allure-maven</artifactId>
115-
<version>2.15.2</version>
116-
<executions>
117-
<execution>
118-
<goals>
119-
<goal>report</goal>
120-
<goal>serve</goal>
121-
</goals>
122-
</execution>
123-
</executions>
124-
</plugin>
125107
<plugin>
126108
<groupId>org.apache.maven.plugins</groupId>
127109
<artifactId>maven-surefire-plugin</artifactId>
128110
<version>3.5.2</version>
129-
<configuration>
130-
<systemPropertyVariables>
131-
<allure.results.directory>${project.build.directory}/allure-results</allure.results.directory>
132-
</systemPropertyVariables>
133-
</configuration>
134111
</plugin>
135112
</plugins>
136113
</build>

0 commit comments

Comments
 (0)