-
-
Notifications
You must be signed in to change notification settings - Fork 126
99 lines (86 loc) · 3.27 KB
/
desktop-windows-test-pull.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
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
- name: build phoenix dist-test
run: |
npm ci
npm run build
npm run release:dev
- name: Download phoenix desktop and build test runner
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 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.windowsRunLegacyInteg.outcome == 'failure'
run: |
echo "Windows tests failed, marking step as failed"
exit 1
shell: cmd