Skip to content

Commit 46c68ad

Browse files
authored
add allure report (via #1266)
1 parent 35ce7c1 commit 46c68ad

66 files changed

Lines changed: 1291 additions & 112 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/build.yml

Lines changed: 63 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,22 +13,83 @@ on:
1313
- 'main'
1414
- 'hotfix-*'
1515

16+
concurrency:
17+
# On main, we don't want any jobs cancelled.
18+
# On PR branches, we cancel the job if new commits are pushed.
19+
group: ${{ github.ref }}
20+
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
21+
1622
jobs:
1723
build:
1824
name: "Build"
1925
runs-on: ubuntu-latest
26+
env:
27+
ALLURE_MATRIX_ENV: ubuntu-jdk-21
28+
ALLURE_TEST_DUMP_NAME: allure-results-test-jdk-21
2029
steps:
2130
- uses: actions/checkout@v6
2231

32+
- uses: actions/setup-node@v6
33+
with:
34+
node-version: '20.x'
35+
2336
- name: "Set up JDK"
2437
uses: actions/setup-java@v5
2538
with:
2639
distribution: 'zulu'
2740
java-version: 21
2841

42+
- name: "Setup Gradle"
43+
uses: gradle/actions/setup-gradle@v6
44+
with:
45+
gradle-version: 'wrapper'
46+
2947
- name: "Build with Gradle"
3048
run: ./gradlew build -x test --scan
3149

32-
- name: "Run tests"
50+
- name: "Run tests with Allure"
3351
if: always()
34-
run: ./gradlew --no-build-cache cleanTest test
52+
run: npx -y allure@3 run --config ./allurerc.mjs --rerun 2 --environment="${{ env.ALLURE_MATRIX_ENV }}" --dump="${{ env.ALLURE_TEST_DUMP_NAME }}" -- ./gradlew --no-build-cache cleanTest test
53+
54+
- name: "Upload Allure test dump"
55+
if: always()
56+
uses: actions/upload-artifact@v7
57+
with:
58+
name: ${{ env.ALLURE_TEST_DUMP_NAME }}
59+
path: ./${{ env.ALLURE_TEST_DUMP_NAME }}.zip
60+
61+
report:
62+
needs: [build]
63+
name: "Build report"
64+
runs-on: ubuntu-latest
65+
if: always()
66+
permissions:
67+
contents: read
68+
pull-requests: write
69+
checks: write
70+
env:
71+
ALLURE_SERVICE_TOKEN: ${{ secrets.ALLURE_SERVICE_TOKEN }}
72+
steps:
73+
- uses: actions/checkout@v6
74+
75+
- uses: actions/setup-node@v6
76+
with:
77+
node-version: '20.x'
78+
79+
- name: "Download Allure dumps"
80+
uses: actions/download-artifact@v8
81+
continue-on-error: true
82+
with:
83+
pattern: allure-results-*
84+
path: ./
85+
merge-multiple: true
86+
87+
- name: "Generate Allure report"
88+
run: npx -y allure@3 generate --config ./allurerc.mjs --dump="allure-results-*.zip" --output=./build/allure-report
89+
90+
- name: "Post Allure summary"
91+
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork == false
92+
uses: allure-framework/allure-action@v0
93+
with:
94+
report-directory: ./build/allure-report
95+
github-token: ${{ secrets.GITHUB_TOKEN }}

AGENTS.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Project Guide
2+
3+
Use [Allure Agent Mode](docs/allure-agent-mode.md) for all test-related work in this repository.
4+
5+
- Read `docs/allure-agent-mode.md` before designing, writing, reviewing, validating, debugging, or enriching tests.
6+
- Run test-executing commands through `allure run`, including smoke checks after small edits.
7+
- Use `./gradlew` for repo-local test commands and scope runs to the smallest relevant module or task.
8+
- If agent-mode output is missing or incomplete, debug that first rather than relying on console-only conclusions.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
allure.results.directory=build/allure-results
22
allure.label.epic=#project.description#
3+
allure.label.module=allure-assertj
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
allure.results.directory=build/allure-results
22
allure.label.epic=#project.description#
3+
allure.label.module=allure-attachments
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
allure.results.directory=build/allure-results
2+
allure.label.epic=#project.description#
3+
allure.label.module=allure-awaitility
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
allure.results.directory=build/allure-results
22
allure.label.epic=#project.description#
3+
allure.label.module=allure-citrus
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
allure.model.indentOutput=true
22
allure.results.directory=build/allure-results
33
allure.label.epic=#project.description#
4+
allure.label.module=allure-cucumber4-jvm
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
allure.model.indentOutput=true
22
allure.results.directory=build/allure-results
33
allure.label.epic=#project.description#
4+
allure.label.module=allure-cucumber5-jvm
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
allure.model.indentOutput=true
22
allure.results.directory=build/allure-results
33
allure.label.epic=#project.description#
4+
allure.label.module=allure-cucumber6-jvm
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
allure.model.indentOutput=true
22
allure.results.directory=build/allure-results
33
allure.label.epic=#project.description#
4+
allure.label.module=allure-cucumber7-jvm

0 commit comments

Comments
 (0)