-
-
Notifications
You must be signed in to change notification settings - Fork 194
133 lines (118 loc) · 4.58 KB
/
desktop-windows-test-pull.yml
File metadata and controls
133 lines (118 loc) · 4.58 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
129
130
131
132
133
name: 'Desktop-Windows full test suite run on pull request'
on:
pull_request:
branches: [ main ]
concurrency:
group: pr-desktop-windows-${{ github.event.pull_request.number }}
cancel-in-progress: true
jobs:
test-desktop-windows:
runs-on: windows-latest
timeout-minutes: 90
steps:
- uses: actions/checkout@v3
- name: setup node
uses: actions/setup-node@v3
with:
node-version: 20
- name: install Rust stable
uses: dtolnay/rust-toolchain@stable
with:
toolchain: 1.85.1
- name: build phoenix dist-test
run: |
npm ci
npm run build
npm run release:dev
- name: Download phoenix desktop and build test runner
env:
GH_TOKEN: ${{ github.token }}
run: |
cd ..
git clone https://github.com/phcode-dev/phoenix-desktop.git
cd phoenix-desktop
npm ci
npm run releaseDistTestDebug
- name: Run tauri unit tests in windows
# GUI apps in windows doesn't log on console. so we capture the output to a text file and print it, then fail on error.
uses: nick-fields/retry@v2
id: windowsRunUnit
continue-on-error: true
with:
timeout_minutes: 12
max_attempts: 3
command: ..\phoenix-desktop\src-tauri\target\debug\phoenix-test.exe --run-tests=unit -q > output-unit.txt 2>&1
shell: cmd
- name: Print windows unit test output to console
run: type output-unit.txt
shell: cmd
- name: Run tauri integration tests in windows
uses: nick-fields/retry@v2
id: windowsRunIntegration
continue-on-error: true
with:
timeout_minutes: 12
max_attempts: 3
command: ..\phoenix-desktop\src-tauri\target\debug\phoenix-test.exe --run-tests=integration -q > output-integration.txt 2>&1
shell: cmd
- name: Print windows integration test output to console
run: type output-integration.txt
shell: cmd
- name: Run tauri mainview tests in windows
uses: nick-fields/retry@v2
id: windowsRunMainview
continue-on-error: true
with:
timeout_minutes: 12
max_attempts: 3
command: ..\phoenix-desktop\src-tauri\target\debug\phoenix-test.exe --run-tests=mainview -q > output-mainview.txt 2>&1
shell: cmd
- name: Print windows mainview test output to console
run: type output-mainview.txt
shell: cmd
- name: Run tauri livepreview tests in windows
uses: nick-fields/retry@v2
id: windowsRunLivepreview
continue-on-error: true
with:
timeout_minutes: 12
max_attempts: 3
command: ..\phoenix-desktop\src-tauri\target\debug\phoenix-test.exe --run-tests=livepreview -q > output-livepreview.txt 2>&1
shell: cmd
- name: Print windows livepreview test output to console
run: type output-livepreview.txt
shell: cmd
- name: Run tauri LegacyInteg tests in windows
uses: nick-fields/retry@v2
id: windowsRunLegacyInteg
continue-on-error: true
with:
timeout_minutes: 30
max_attempts: 3
command: ..\phoenix-desktop\src-tauri\target\debug\phoenix-test.exe --run-tests=LegacyInteg -q > output-LegacyInteg.txt 2>&1
shell: cmd
- name: Print windows LegacyInteg test output to console
run: type output-LegacyInteg.txt
shell: cmd
- name: Fail on test runs failed in windows
if: steps.windowsRunUnit.outcome == 'failure' || steps.windowsRunIntegration.outcome == 'failure' || steps.windowsRunMainview.outcome == 'failure' || steps.windowsRunLivepreview.outcome == 'failure' || steps.windowsRunLegacyInteg.outcome == 'failure'
run: |
echo "Windows tests failed, marking step as failed"
echo "Failed tests:"
if "${{ steps.windowsRunUnit.outcome }}" == "failure" (
echo "- Run tauri unit tests"
)
if "${{ steps.windowsRunIntegration.outcome }}" == "failure" (
echo "- Run tauri integration tests"
)
if "${{ steps.windowsRunMainview.outcome }}" == "failure" (
echo "- Run tauri mainview tests"
)
if "${{ steps.windowsRunLivepreview.outcome }}" == "failure" (
echo "- Run tauri livepreview tests"
)
if "${{ steps.windowsRunLegacyInteg.outcome }}" == "failure" (
echo "- Run tauri LegacyInteg tests"
)
exit 1
shell: cmd