Skip to content

Commit 1e85bd4

Browse files
committed
ci: add prod tests for mac m1 desktop app as well
1 parent 818c1c7 commit 1e85bd4

File tree

2 files changed

+111
-1
lines changed

2 files changed

+111
-1
lines changed

.github/workflows/desktop-linux-prod-test-pull.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
name: 'Desktop-Linux prod release full test suite run on pull request'
2-
# we only do this on linux as a sanity. detailed tests will be run on pulls on staging/prod branch
32
on:
43
pull_request:
54
branches: [ main ]
Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
name: 'Desktop-mac M1 prod release full test suite run on pull request'
2+
on:
3+
pull_request:
4+
branches: [ main ]
5+
6+
concurrency:
7+
group: pr-desktop-mac-m1-prod-${{ github.event.pull_request.number }}
8+
cancel-in-progress: true
9+
10+
jobs:
11+
test-desktop-mac-m1-prod:
12+
runs-on: macos-15
13+
timeout-minutes: 90
14+
steps:
15+
- uses: actions/checkout@v3
16+
- name: setup node
17+
uses: actions/setup-node@v3
18+
with:
19+
node-version: 20
20+
- name: install Rust stable
21+
uses: dtolnay/rust-toolchain@stable
22+
with:
23+
toolchain: 1.85.1
24+
25+
- name: build phoenix dist-test
26+
env:
27+
PRO_REPO_URL: ${{ secrets.PRO_REPO_URL }}
28+
PRO_REPO_ACCESS_TOKEN: ${{ secrets.PRO_REPO_ACCESS_TOKEN }}
29+
run: |
30+
npm ci
31+
npm run build
32+
npm run release:prod
33+
34+
- name: Download phoenix desktop and build test runner
35+
env:
36+
GH_TOKEN: ${{ github.token }}
37+
PRO_REPO_URL: ${{ secrets.PRO_REPO_URL }}
38+
PRO_REPO_ACCESS_TOKEN: ${{ secrets.PRO_REPO_ACCESS_TOKEN }}
39+
run: |
40+
cd ..
41+
git clone https://github.com/phcode-dev/phoenix-desktop.git
42+
cd phoenix-desktop
43+
npm ci
44+
npm run releaseDistTestDebug
45+
46+
- name: Run tauri unit tests
47+
uses: nick-fields/retry@v2
48+
id: macM1RunUnit
49+
continue-on-error: true
50+
with:
51+
timeout_minutes: 12
52+
max_attempts: 3
53+
command: ../phoenix-desktop/src-tauri/target/debug/phoenix-test --run-tests=unit -q
54+
55+
- name: Run tauri integration tests
56+
uses: nick-fields/retry@v2
57+
id: macM1RunIntegration
58+
continue-on-error: true
59+
with:
60+
timeout_minutes: 12
61+
max_attempts: 3
62+
command: ../phoenix-desktop/src-tauri/target/debug/phoenix-test --run-tests=integration -q
63+
64+
- name: Run tauri mainview tests
65+
uses: nick-fields/retry@v2
66+
id: macM1RunMainview
67+
continue-on-error: true
68+
with:
69+
timeout_minutes: 12
70+
max_attempts: 3
71+
command: ../phoenix-desktop/src-tauri/target/debug/phoenix-test --run-tests=mainview -q
72+
73+
- name: Run tauri livepreview tests
74+
uses: nick-fields/retry@v2
75+
id: macM1RunLivepreview
76+
continue-on-error: true
77+
with:
78+
timeout_minutes: 12
79+
max_attempts: 3
80+
command: ../phoenix-desktop/src-tauri/target/debug/phoenix-test --run-tests=livepreview -q
81+
82+
- name: Run tauri LegacyInteg tests
83+
uses: nick-fields/retry@v2
84+
id: macM1RunLegacyInteg
85+
continue-on-error: true
86+
with:
87+
timeout_minutes: 20
88+
max_attempts: 3
89+
command: ../phoenix-desktop/src-tauri/target/debug/phoenix-test --run-tests=LegacyInteg -q
90+
91+
- name: Fail on test runs failed in Mac M1 (prod sanity)
92+
if: steps.macM1RunUnit.outcome == 'failure' || steps.macM1RunIntegration.outcome == 'failure' || steps.macM1RunMainview.outcome == 'failure' || steps.macM1RunLivepreview.outcome == 'failure' || steps.macM1RunLegacyInteg.outcome == 'failure'
93+
run: |
94+
echo "Mac M1 (prod) tests failed, marking step as failed"
95+
echo "Failed tests:"
96+
if [ "${{ steps.macM1RunUnit.outcome }}" == "failure" ]; then
97+
echo "- Run tauri unit tests"
98+
fi
99+
if [ "${{ steps.macM1RunIntegration.outcome }}" == "failure" ]; then
100+
echo "- Run tauri integration tests"
101+
fi
102+
if [ "${{ steps.macM1RunMainview.outcome }}" == "failure" ]; then
103+
echo "- Run tauri mainview tests"
104+
fi
105+
if [ "${{ steps.macM1RunLivepreview.outcome }}" == "failure" ]; then
106+
echo "- Run tauri livepreview tests"
107+
fi
108+
if [ "${{ steps.macM1RunLegacyInteg.outcome }}" == "failure" ]; then
109+
echo "- Run tauri LegacyInteg tests"
110+
fi
111+
exit 1

0 commit comments

Comments
 (0)