-
Notifications
You must be signed in to change notification settings - Fork 1
128 lines (111 loc) · 3.44 KB
/
Copy pathci.yml
File metadata and controls
128 lines (111 loc) · 3.44 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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
name: Selenium Tests
on:
push:
branches: [main]
pull_request:
branches: [main]
schedule:
# Nightly regression at 18:30 UTC (≈ 04:30 AEST).
- cron: '30 18 * * *'
workflow_dispatch:
inputs:
suite:
description: 'TestNG suite to run'
type: choice
default: testng.xml
options: [testng.xml, testng-smoke.xml]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
build:
name: Compile
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v5
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: '17'
cache: maven
- name: Compile
run: ./mvnw -B clean test-compile
test:
# Firefox is the gating browser here. Chrome runs in chrome.yml, which does
# not gate — see "An open finding: Chrome on GitHub's runners" in the README
# for the measurements behind that split.
name: firefox
needs: build
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v5
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: '17'
cache: maven
# Ubuntu runners ship Firefox. Selenium Manager resolves the matching
# geckodriver at run time, so no driver binaries are installed here.
- name: Run the suite
run: |
./mvnw -B test \
-Dsuite=${{ inputs.suite || 'testng.xml' }} \
-Dbrowser=firefox \
-Dheadless=true \
-Dthreads=2
- name: Upload Allure results
if: ${{ !cancelled() }}
uses: actions/upload-artifact@v5
with:
name: allure-results-firefox
path: target/allure-results
retention-days: 7
- name: Upload Surefire reports
if: failure()
uses: actions/upload-artifact@v5
with:
name: surefire-reports-firefox
path: target/surefire-reports
retention-days: 7
report:
name: Publish Allure report
needs: test
if: ${{ !cancelled() && github.ref == 'refs/heads/main' && github.event_name != 'pull_request' }}
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
contents: read
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- uses: actions/checkout@v5
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: '17'
cache: maven
- name: Download results
uses: actions/download-artifact@v5
with:
name: allure-results-firefox
# The Allure Maven plugin reads from the build directory, so the
# artifact is restored to exactly where a local run would leave it.
path: target/allure-results
# Generated with the allure-maven plugin already declared in the POM
# rather than a third-party action. The popular marketplace action builds
# from openjdk:8-jre-alpine, an image that no longer exists on Docker Hub,
# so it fails at image pull.
- name: Generate the report
run: ./mvnw -B allure:report
- uses: actions/upload-pages-artifact@v3
with:
path: target/site/allure-maven-plugin
- id: deployment
uses: actions/deploy-pages@v4