-
Notifications
You must be signed in to change notification settings - Fork 6
56 lines (50 loc) · 1.94 KB
/
report.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
name: Generate Report
on:
workflow_call:
jobs:
generate-report:
runs-on: ubuntu-latest
if: ${{ ! startsWith(github.ref, 'refs/heads/renovate/') && !(github.event_name == 'pull_request' && startsWith(github.head_ref, 'renovate/')) }}
steps:
- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: zulu
java-version: 21
- name: Download allure results
id: download-allure-results
uses: actions/download-artifact@v4
with:
pattern: allure_results_*
merge-multiple: true
path: allure-results
- name: Load test report history
id: allure-history
uses: actions/checkout@v4
continue-on-error: true # in case run without branch for GitHub page source
with:
ref: gh-pages
path: gh-pages
- name: Build test report
id: allure-report
if: always()
uses: simple-elf/allure-report-action@91e6ff976a8b2303f2551ca36c39ba5256952c08 # v1.11
with:
gh_pages: gh-pages
allure_history: allure-history
allure_results: allure-results
allure_report: allure-report
keep_reports: 10
- name: Publish test report
id: deploy-allure-report-page
if: steps.allure-report.outcome == 'success' # make sure the allure report is generated successfully
uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e # v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: gh-pages
publish_dir: allure-history
- name: Create job summaries
if: steps.deploy-allure-report-page.outcome == 'success'
run: |
pages_url=https://${GITHUB_REPOSITORY_OWNER}.github.io/${GITHUB_REPOSITORY#${GITHUB_REPOSITORY_OWNER}/}/${{ github.run_number }}/#behaviors
echo "[Allure report 📝](${pages_url})" >> $GITHUB_STEP_SUMMARY