-
Notifications
You must be signed in to change notification settings - Fork 34
119 lines (106 loc) · 3.95 KB
/
ui_check.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
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
name: ui
on:
push:
branches:
- master
pull_request:
jobs:
run-ui-tests:
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 ui-tests/build/reports
./gradlew :plugin:runIdeForUiTests > ui-tests/build/reports/idea.log &
runTests: |
export DISPLAY=:99.0
./gradlew :ui-tests:test
url: http://127.0.0.1:8082
reportName: ui-tests-fails-report-linux
# - os: macOS-latest
# runIde: ./gradlew :plugin:runIdeForUiTests &
# runTests: ./gradlew :ui-tests:test
# url: http://127.0.0.1:8082
# reportName: ui-test-fails-report-mac
# - os: windows-latest
# runIde: start gradlew.bat :plugin:runIdeForUiTests
# runTests: ./gradlew :ui-tests:test
# url: http://localhost:8082
# reportName: ui-test-fails-report-windows
runs-on: ${{ matrix.os }}
steps:
- uses: actions/[email protected]
- name: Setup FFmpeg
uses: FedericoCarboni/setup-ffmpeg@v2
with:
# Not strictly necessary, but it may prevent rate limit
# errors especially on GitHub-hosted macos machines.
token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Java
uses: actions/[email protected]
with:
distribution: zulu
java-version: 17
# - name: Build
# uses: gradle/[email protected]
# with:
# gradle-version: wrapper
# cache-read-only: false
# arguments: "assemble testClasses -Pkotlin.incremental=false --no-daemon --stacktrace"
# gradle-home-cache-excludes: |
# caches/modules-2/files-2.1/com.jetbrains.intellij.pycharm
# caches/modules-2/files-2.1/com.jetbrains.intellij.idea
# caches/modules-2/files-2.1/com.jetbrains.intellij.clion
- name: Setup Gradle and dependencies
uses: gradle/actions/[email protected]
with:
gradle-version: wrapper
cache-read-only: false
arguments: ":resolveDependencies -Pkotlin.incremental=false --no-daemon"
gradle-home-cache-excludes: |
caches/modules-2/files-2.1/com.jetbrains.intellij.pycharm
caches/modules-2/files-2.1/com.jetbrains.intellij.idea
caches/modules-2/files-2.1/com.jetbrains.intellij.clion
# - name: Prepare UI testing sandbox
# uses: gradle/[email protected]
# with:
# gradle-version: wrapper
# arguments: ":plugin:prepareUiTestingSandbox -Pkotlin.incremental=false --no-daemon --stacktrace"
# gradle-home-cache-excludes: |
# caches/modules-2/files-2.1/com.jetbrains.intellij.pycharm
# caches/modules-2/files-2.1/com.jetbrains.intellij.idea
# caches/modules-2/files-2.1/com.jetbrains.intellij.clion
- name: Clean plugin
run: ./gradlew :plugin:clean
- name: Clean ui-tests
run: ./gradlew :ui-tests: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 ui-tests/video ui-tests/build/reports
#
- name: Copy logs
if: ${{ failure() }}
run: mv ui-tests/build/idea-sandbox/system/log/ ui-tests/build/reports
- name: Save fails report
if: ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.reportName }}
path: |
ui-tests/build/reports