@@ -2,37 +2,11 @@ name: Run desktop regression tests
2
2
on :
3
3
workflow_dispatch :
4
4
inputs :
5
- PLAYWRIGHT_REPO :
6
- description : ' Playwright repo to checkout'
7
- required : true
8
- type : choice
9
- options :
10
- - session-foundation/session-playwright
11
- - burtonemily/session-playwright
12
- - bilb/session-playwright
13
- default : session-foundation/session-playwright
14
-
15
- BRANCH_TO_CHECKOUT_PW :
16
- description : ' branch to checkout on session-playwright'
5
+ DESKTOP_JOB_URL :
6
+ description : ' The url of the session-desktop job'
17
7
required : true
18
8
type : string
19
- default : regression-tests-groups
20
-
21
- SESSION_DESKTOP_REPO :
22
- description : ' Session desktop repo to checkout'
23
- required : true
24
- type : choice
25
- options :
26
- - session-foundation/session-desktop
27
- - bilb/session-desktop
28
- - yougotwill/session-desktop
29
- default : session-foundation/session-desktop
30
-
31
- BRANCH_TO_CHECKOUT_SESSION :
32
- description : ' Branch to checkout on session-desktop'
33
- required : true
34
- type : string
35
- default : dev
9
+ default : https://github.com/session-foundation/session-desktop/actions/runs/17312227704
36
10
37
11
PLAYWRIGHT_REPEAT_COUNT :
38
12
description : ' Repeats of each tests (0 to only run each once)'
@@ -59,116 +33,94 @@ concurrency:
59
33
jobs :
60
34
desktop-regression :
61
35
name : Desktop Regression Tests
62
- runs-on : [self-hosted, Linux, X64, qa-desktop]
63
- container :
64
- image : mcr.microsoft.com/playwright:v1.51.0-noble
65
- options : --cpus 16
36
+ runs-on : [self-hosted, qa-android]
66
37
67
38
env :
39
+ PAT_TOKEN : ${{ secrets.PAT_TOKEN }}
68
40
PLAYWRIGHT_REPEAT_COUNT : ${{ github.event.inputs.PLAYWRIGHT_REPEAT_COUNT }}
69
41
PLAYWRIGHT_RETRIES_COUNT : ${{ github.event.inputs.PLAYWRIGHT_RETRIES_COUNT }}
70
42
PLAYWRIGHT_WORKERS_COUNT : ${{ github.event.inputs.PLAYWRIGHT_WORKERS_COUNT }}
71
- DESKTOP_CACHED_FOLDER : desktop/node_modules
43
+ DESKTOP_JOB_URL : ${{ github.event.inputs.DESKTOP_JOB_URL }}
44
+ ARTIFACT_NAME : ' Linux-X64-deb-qa-production'
45
+ CI : true
72
46
73
47
steps :
74
48
- uses : actions/checkout@v4
49
+ with :
50
+ lfs : true
51
+
75
52
- name : Runner Details
76
53
run : |
77
- echo "PLAYWRIGHT_REPO ${{ github.event.inputs.PLAYWRIGHT_REPO }}"
78
- echo "BRANCH_TO_CHECKOUT_PW ${{ github.event.inputs.BRANCH_TO_CHECKOUT_PW }}"
79
- echo "SESSION_DESKTOP_REPO ${{ github.event.inputs.SESSION_DESKTOP_REPO }}"
80
- echo "BRANCH_TO_CHECKOUT_SESSION ${{ github.event.inputs.BRANCH_TO_CHECKOUT_SESSION }}"
54
+ echo "DESKTOP_JOB_URL ${{ github.event.inputs.DESKTOP_JOB_URL }}"
55
+ echo "PLAYWRIGHT_REPEAT_COUNT ${{ github.event.inputs.PLAYWRIGHT_REPEAT_COUNT }}"
56
+ echo "PLAYWRIGHT_RETRIES_COUNT ${{ github.event.inputs.PLAYWRIGHT_RETRIES_COUNT }}"
57
+ echo "PLAYWRIGHT_WORKERS_COUNT ${{ github.event.inputs.PLAYWRIGHT_WORKERS_COUNT }}"
81
58
82
- - uses : actions/checkout@v4
83
- name : ' Checkout playwright'
84
- with :
85
- repository : ${{ github.event.inputs.PLAYWRIGHT_REPO }}
86
- ref : ${{ github.event.inputs.BRANCH_TO_CHECKOUT_PW }}
87
- path : ' playwright'
59
+ - name : ' Download prebuilt session-desktop'
60
+ run : |
61
+ RUN_ID=$(echo "$DESKTOP_JOB_URL" | sed -E 's|.*/runs/([0-9]+).*|\1|')
62
+ echo "Run ID: $RUN_ID"
88
63
89
- - name : Install system deps
90
- run : apt update && apt install -y git g++ build-essential cmake
91
64
92
- - uses : actions/checkout@v4
93
- name : ' Checkout Session desktop'
94
- with :
95
- repository : ${{ github.event.inputs.SESSION_DESKTOP_REPO }}
96
- ref : ${{ github.event.inputs.BRANCH_TO_CHECKOUT_SESSION }}
97
- path : ' desktop'
65
+ response=$(curl -s -H "Authorization: Bearer $PAT_TOKEN" \
66
+ -H "Accept: application/vnd.github+json" \
67
+ "https://api.github.com/repos/session-foundation/session-desktop/actions/runs/$RUN_ID/artifacts")
68
+ echo "response: $response"
98
69
99
- # Note: caching is breaking things up (app doesn't start)
100
- # - name: Calculate desktop cache key
101
- # run: |
102
- # echo "CACHE_KEY=${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('desktop/package.json', 'desktop/yarn.lock', 'desktop/patches/**') }}" >> $GITHUB_ENV
103
70
104
- - name : Install node
105
- uses : actions/setup-node@v3
106
- with :
107
- node-version-file : ' desktop/.nvmrc'
71
+ artifact_url=$(echo "$response" | jq -r \
72
+ --arg name "$ARTIFACT_NAME" \
73
+ '.artifacts[] | select(.name == $name) | .archive_download_url')
108
74
109
- - uses : actions/setup-python@v4
110
- with :
111
- python-version : ' 3.12'
112
75
113
- - name : Install setuptools for python 3.12
114
- shell : bash
115
- run : python -m pip install --upgrade pip setuptools
116
76
117
- # Note: caching is breaking things up (app doesn't start)
118
- # - uses: actions/cache/restore@v4
119
- # id: cache-desktop-modules
120
- # with:
121
- # path: ${{ env.DESKTOP_CACHED_FOLDER }}
122
- # key: ${{ env.CACHE_KEY }}
77
+ echo "Session desktop Artifact URL: $artifact_url"
123
78
124
- - name : Install yarn
125
- run : |
126
- npm install -g yarn
79
+ curl -L \
80
+ -H "Authorization: token $PAT_TOKEN" \
81
+ -H "Accept: application/vnd.github+json" \
82
+ -o artifact.zip \
83
+ $artifact_url
127
84
128
- - name : List desktop folder
129
- run : |
130
- pwd
131
- ls -la desktop
85
+ unzip artifact.zip
132
86
133
- - name : List playwright folder
87
+ - name : ' print files '
134
88
run : |
135
- pwd
136
- ls -la playwright
89
+ ls -l
137
90
138
- - name : Install desktop dependencies
139
- shell : bash
140
- # if: steps.cache-desktop-modules.outputs.cache-hit != 'true'
141
- run : cd $GITHUB_WORKSPACE/desktop && yarn install --frozen-lockfile --network-timeout 600000
91
+ - name : ' Extract deb package'
92
+ run : |
93
+ dpkg-deb -x *.deb extracted-deb
94
+ ls ./extracted-deb
95
+ ls -l ./extracted-deb/opt/Session/session-desktop
142
96
143
- # Note: caching is breaking things up (app doesn't start)
144
- # - uses: actions/cache/save@v4
145
- # if: always()
146
- # with:
147
- # path: ${{ env.DESKTOP_CACHED_FOLDER }}
148
- # key: ${{ env.CACHE_KEY }}
97
+ - name : Install node
98
+ uses : actions/setup-node@v4
99
+ with :
100
+ node-version-file : ' .nvmrc'
149
101
150
- - name : Build desktop
151
- shell : bash
152
- run : cd $GITHUB_WORKSPACE/desktop && yarn build-everything
102
+ - name : Install yarn
103
+ run : |
104
+ npm install -g yarn
153
105
154
- - name : Install playwright dependencies
106
+ - name : Install dependencies
155
107
run : |
156
- cd $GITHUB_WORKSPACE/playwright && yarn install --frozen-lockfile
108
+ yarn install --frozen-lockfile
157
109
158
110
- name : Build the Desktop tests
159
111
run : |
160
- cd $GITHUB_WORKSPACE/playwright
161
- yarn tsc
112
+ cd $GITHUB_WORKSPACE
113
+ yarn tsc
162
114
163
115
- name : Run the Desktop tests
164
116
run : |
165
- cd $GITHUB_WORKSPACE/playwright
166
- SESSION_DESKTOP_ROOT=$GITHUB_WORKSPACE/desktop nice ionice xvfb-run --auto-servernum --server-num=1 --server-args='-screen 0, 1920x1080x24' yarn test
167
- # DEBUG="pw:*"
117
+ PRINT_ONGOING_TEST_LOGS= nice ionice xvfb-run --auto-servernum --server-num=1 --server-args='-screen 0, 1920x1080x24' yarn test
118
+ # DEBUG="pw:*"
119
+ #
168
120
169
121
- name : Kill all running electron app
170
122
if : always()
171
- continue-on-error : true # just so we don't fail
123
+ continue-on-error : true
172
124
shell : bash
173
125
run : |
174
126
killall electron;
0 commit comments