Skip to content

Commit b57c88c

Browse files
author
Piotr Kubicki
committed
feat(ci): add Allure Reports to GitHub Actions for better test visibility
1 parent 57753cb commit b57c88c

File tree

1 file changed

+35
-4
lines changed

1 file changed

+35
-4
lines changed

.github/workflows/ci.yml

Lines changed: 35 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,40 @@ jobs:
2121
- name: Set up JDK 21
2222
uses: actions/setup-java@v3
2323
with:
24-
java-version: '21'
2524
distribution: 'temurin'
26-
cache: maven
25+
java-version: '21'
26+
cache: 'maven'
27+
28+
- name: Build and Run Tests with Allure
29+
run: mvn clean verify -DtrimStackTrace=false -Dorg.slf4j.simpleLogger.defaultLogLevel=debug
30+
31+
- name: Generate Surefire and Allure Reports
32+
run: mvn site allure:report
33+
34+
- name: Upload Test Reports (Surefire + Allure)
35+
if: always()
36+
uses: actions/upload-artifact@v4
37+
with:
38+
name: test-reports
39+
path: |
40+
target/surefire-reports/
41+
target/failsafe-reports/
42+
target/site/
43+
target/allure-report/
44+
retention-days: 90
45+
46+
- name: Publish Allure Report
47+
if: always()
48+
uses: actions/upload-pages-artifact@v3
49+
with:
50+
path: target/allure-report/
2751

28-
- name: Build and test with Maven
29-
run: mvn clean verify
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

0 commit comments

Comments
 (0)