Skip to content

Commit 7eeb374

Browse files
author
serhii.suzanskyi
committed
test allure
1 parent cfb646c commit 7eeb374

1 file changed

Lines changed: 33 additions & 10 deletions

File tree

.github/workflows/test-automation.yml

Lines changed: 33 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Test Automation
22

33
on:
44
push:
5-
branches: [ main, master, deployment/pipeline]
5+
branches: [ main, master, deployment/pipeline ]
66
pull_request:
77
branches: [ main, master ]
88
workflow_dispatch:
@@ -32,22 +32,45 @@ jobs:
3232
source .venv/bin/activate
3333
behave --tags=@login || true # Prevent pipeline failure on test failures
3434
35-
- name: Install Allure and Generate Report
35+
- name: Install Allure
3636
run: |
3737
curl -sLo allure-2.24.0.tgz https://github.com/allure-framework/allure2/releases/download/2.24.0/allure-2.24.0.tgz
3838
tar -zxvf allure-2.24.0.tgz
3939
sudo mv allure-2.24.0 /opt/allure
4040
sudo ln -s /opt/allure/bin/allure /usr/local/bin/allure
4141
42-
- name: Upload Allure Report as Artifact
43-
uses: actions/upload-artifact@v4
42+
- name: Load test report history
43+
uses: actions/checkout@v3
44+
if: always()
45+
continue-on-error: true
4446
with:
45-
name: allure-report
46-
path: reports/allure-report
47+
ref: gh-pages
48+
path: gh-pages
4749

48-
- name: Deploy Allure Report to GitHub Pages
49-
if: github.event_name == 'push'
50+
- name: Build test report
51+
uses: simple-elf/allure-report-action@v1.7
52+
if: always()
53+
with:
54+
gh_pages: gh-pages
55+
allure_history: allure-history
56+
allure_results: reports/allure-report
57+
58+
- name: Publish test report
5059
uses: peaceiris/actions-gh-pages@v3
60+
if: always()
5161
with:
52-
github_token: ${{ secrets.GITHUB_TOKEN }}
53-
publish_dir: reports/allure-report
62+
github_token: ${{ secrets.GITHUB_TOKEN }}
63+
publish_branch: gh-pages
64+
publish_dir: allure-history
65+
# - name: Upload Allure Report as Artifact
66+
# uses: actions/upload-artifact@v4
67+
# with:
68+
# name: allure-report
69+
# path: reports/allure-report
70+
#
71+
# - name: Deploy Allure Report to GitHub Pages
72+
# if: github.event_name == 'push'
73+
# uses: peaceiris/actions-gh-pages@v3
74+
# with:
75+
# github_token: ${{ secrets.GITHUB_TOKEN }}
76+
# publish_dir: reports/allure-report

0 commit comments

Comments
 (0)