-
Notifications
You must be signed in to change notification settings - Fork 0
81 lines (67 loc) · 2.08 KB
/
selenium_test.yml
File metadata and controls
81 lines (67 loc) · 2.08 KB
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
name: selenium_test
on:
push:
branches: [main]
pull_request:
branches: [main]
permissions:
checks: write
pull-requests: write
contents: read
jobs:
selenium_test:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: '17'
- name: Cache Maven repository
uses: actions/cache@v3
with:
path: ~/.m2
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-maven-
- name: Install Chrome
uses: browser-actions/setup-chrome@latest
- name: Run Maven tests
run: mvn clean test
- name: Upload Surefire Reports (for debugging)
if: failure()
uses: actions/upload-artifact@v4
with:
name: surefire-reports
path: target/surefire-reports
- name: Load Allure test report history
uses: actions/checkout@v4
if: success() || failure()
continue-on-error: true
with:
ref: gh-pages
path: gh-pages
- name: Prepare Allure history
run: |
mkdir -p target/allure-history
if [ -d gh-pages/allure-history ]; then
cp -r gh-pages/allure-history target/allure-history
fi
- name: Generate Allure Report
run: mvn allure:report
- name: Save Allure history
run: |
mkdir -p target/site/allure-maven-plugin/allure-history
cp -r target/allure-history/* target/site/allure-maven-plugin/allure-history
- name: Upload Allure Report Artifact
uses: actions/upload-artifact@v4
with:
name: allure-report
path: target/site/allure-maven-plugin
- name: Deploy Allure Report to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.EPOLIF_TOKEN }}
publish_branch: gh-pages
publish_dir: target/site/allure-maven-plugin