-
Notifications
You must be signed in to change notification settings - Fork 1
92 lines (76 loc) · 2.36 KB
/
Copy pathupgrade.yml
File metadata and controls
92 lines (76 loc) · 2.36 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
82
83
84
85
86
87
88
89
90
91
92
name: Java CI with Maven
on:
pull_request:
branches: main
permissions:
contents: write
pages: write
id-token: write
actions: read
checks: write
jobs:
build:
name: Build On
strategy:
max-parallel: 4
matrix:
os: [ ubuntu-latest, windows-latest, macos-latest ]
runs-on: ${{ matrix.os }}
steps:
- name: Clone code from repo
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'corretto'
cache: maven
- name: Cache m2 dependencies
uses: actions/cache@v4
with:
path: .m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Build with Maven
if: ${{ matrix.os == 'ubuntu-latest' }}
run: mvn clean -e install -Dmaven.test.skip=true
- name: Test Framework
if: ${{ matrix.os == 'ubuntu-latest' }}
run: mvn clean test -Dtest=FrameworkTest
- name: Cross Browser Testing
if: ${{ matrix.os == 'ubuntu-latest' }}
run: mvn test -Dsurefire.suiteXmlFiles=xmlSuits/crossBrowser.xml
- name: Build and Test with Maven
if: ${{ matrix.os != 'ubuntu-latest' }}
run: mvn -B package --file pom.xml
- name: Dorny Test Reporter
uses: dorny/test-reporter@v1.9.1
if: success() || failure()
with:
name: Test Report for ${{ matrix.os }}
path: target/surefire-reports/TEST-*.xml
reporter: java-junit
- name: Load Allure test report history
uses: actions/checkout@v4
if: always()
continue-on-error: true
with:
ref: gh-pages
path: gh-pages
- name: Build Allure test report
uses: simple-elf/allure-report-action@v1.7
if: ${{ matrix.os == 'ubuntu-latest' }}
with:
gh_pages: gh-pages
allure_history: allure-history
allure_results: target/allure-results
- name: Publish Allure test report
uses: peaceiris/actions-gh-pages@v3
if: ${{ matrix.os == 'ubuntu-latest' }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: gh-pages
publish_dir: allure-history