Skip to content

Commit 06cf8c0

Browse files
committed
Updated actions into two jobs
1 parent 8625fd1 commit 06cf8c0

File tree

1 file changed

+37
-6
lines changed

1 file changed

+37
-6
lines changed

.github/workflows/playwright-tests.yml

Lines changed: 37 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ name: Playwright Tests
44
on:
55
push:
66
branches:
7-
- '**' # Run on every branch for every commit
7+
- '**' # Run on pushes to main
88
pull_request:
99
branches:
1010
- '**' # Run on every pull request for any branch
@@ -59,19 +59,50 @@ jobs:
5959
- name: Run Playwright Tests
6060
run: mvn verify
6161

62+
# Step 7: Upload the 'target' directory as an artifact
63+
- name: Upload 'target' directory
64+
if: always() # Ensure this step runs even if tests fail
65+
uses: actions/upload-artifact@v3
66+
with:
67+
name: target-directory
68+
path: target
69+
70+
# # Step 7: Archive ZIP files in the root directory
71+
# - name: Archive ZIP files
72+
# if: always() # Ensure this step runs even if previous steps fail
73+
# uses: actions/upload-artifact@v4
74+
# with:
75+
# name: zip-archives
76+
# path: 'target/*.zip'
77+
#
78+
# # Step 8: Deploy Allure report to GitHub Pages
79+
# - name: Deploy Allure Report to GitHub Pages
80+
# if: always() # Ensure this step runs even if tests fail
81+
# uses: peaceiris/actions-gh-pages@v3
82+
# with:
83+
# github_token: ${{ secrets.GITHUB_TOKEN }}
84+
# publish_dir: target/site/allure-maven-plugin
85+
86+
reporting:
87+
runs-on: ubuntu-latest
88+
needs: test
89+
steps:
90+
# Step 1: Download the 'target' directory
91+
- name: Download 'target' directory
92+
uses: actions/download-artifact@v3
93+
with:
94+
name: target-directory
6295

63-
# Step 7: Archive ZIP files in the root directory
96+
# Step 2: Archive ZIP files in the root directory
6497
- name: Archive ZIP files
65-
if: always() # Ensure this step runs even if previous steps fail
6698
uses: actions/upload-artifact@v4
6799
with:
68100
name: zip-archives
69101
path: 'target/*.zip'
70102

71-
# Step 8: Deploy Allure report to GitHub Pages
103+
# Step 3: Deploy Allure report to GitHub Pages
72104
- name: Deploy Allure Report to GitHub Pages
73-
if: always() # Ensure this step runs even if tests fail
74105
uses: peaceiris/actions-gh-pages@v3
75106
with:
76107
github_token: ${{ secrets.GITHUB_TOKEN }}
77-
publish_dir: target/site/allure-maven-plugin
108+
publish_dir: target/site/allure-maven-plugin

0 commit comments

Comments
 (0)