-
Notifications
You must be signed in to change notification settings - Fork 1
71 lines (60 loc) · 1.86 KB
/
ui-test.yml
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
# Inspiration:
# - https://github.com/JetBrains/intellij-ui-test-robot/blob/139a05eb99e9a49f13605626b81ad9864be23c96/.github/workflows/runTest.yml
# - https://github.com/redhat-developer/intellij-quarkus/blob/efc6c6afa78f28b95f55f8c0f71e6585200e7e9d/.github/workflows/itests.yml
name: UI Tests
on:
push:
branches: [master]
pull_request:
jobs:
run-ui-test:
name: run tests for ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
runIde: |
export DISPLAY=:99.0
Xvfb -ac :99 -screen 0 1920x1080x24 &
sleep 10
mkdir -p build/reports
./gradlew runIdeForUiTests > build/reports/idea.log &
runTests: |
export DISPLAY=:99.0
./gradlew testUI
url: http://127.0.0.1:8082
reportName: ui-test-fails-report-linux
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4.1.5
- name: Setup Java
uses: actions/setup-java@v4.5.0
with:
distribution: zulu
java-version: 17
- name: Clean
run: ./gradlew clean
- name: Run Idea
run: ${{ matrix.runIde }}
- name: Wait for Idea started
uses: jtalk/url-health-check-action@v3
with:
url: ${{ matrix.url }}
max-attempts: 15
retry-delay: 30s
- name: Run tests
run: ${{ matrix.runTests }}
- name: Move video
if: ${{ failure() }}
run: mv video build/reports
- name: Copy logs
if: ${{ failure() }}
run: mv build/idea-sandbox/system/log/ build/reports
- name: Save fails report
if: ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.reportName }}
path: |
build/reports