@@ -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 : ' URL of the job on session-foundation/session-desktop'
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/15481004324
36
10
37
11
PLAYWRIGHT_REPEAT_COUNT :
38
12
description : ' Repeats of each tests (0 to only run each once)'
50
24
description : ' Playwright workers to start'
51
25
required : true
52
26
type : number
53
- default : 8
27
+ default : 1
54
28
55
29
concurrency :
56
30
group : ${{ github.workflow }}
@@ -65,105 +39,82 @@ jobs:
65
39
options : --cpus 16
66
40
67
41
env :
42
+ PAT_TOKEN : ${{ secrets.PAT_TOKEN }}
68
43
PLAYWRIGHT_REPEAT_COUNT : ${{ github.event.inputs.PLAYWRIGHT_REPEAT_COUNT }}
69
44
PLAYWRIGHT_RETRIES_COUNT : ${{ github.event.inputs.PLAYWRIGHT_RETRIES_COUNT }}
70
45
PLAYWRIGHT_WORKERS_COUNT : ${{ github.event.inputs.PLAYWRIGHT_WORKERS_COUNT }}
71
- DESKTOP_CACHED_FOLDER : desktop/node_modules
46
+ DESKTOP_JOB_URL : ${{ github.event.inputs.DESKTOP_JOB_URL }}
47
+ ARTIFACT_NAME : ' Linux-X64-AppImage-qa-production'
48
+ CI : true
72
49
73
50
steps :
74
- - uses : actions/checkout@v4
75
51
- name : Runner Details
76
52
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 }}"
81
-
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'
53
+ echo "DESKTOP_JOB_URL ${{ github.event.inputs.DESKTOP_JOB_URL }}"
54
+ echo "PLAYWRIGHT_REPEAT_COUNT ${{ github.event.inputs.PLAYWRIGHT_REPEAT_COUNT }}"
55
+ echo "PLAYWRIGHT_RETRIES_COUNT ${{ github.event.inputs.PLAYWRIGHT_RETRIES_COUNT }}"
56
+ echo "PLAYWRIGHT_WORKERS_COUNT ${{ github.event.inputs.PLAYWRIGHT_WORKERS_COUNT }}"
88
57
89
- - name : Install system deps
90
- run : apt update && apt install -y git g++ build-essential cmake
58
+ - name : Install git lfs
59
+ run : |
60
+ apt-get update && \
61
+ apt-get install -y git-lfs unzip jq && \
62
+ git lfs install
91
63
92
64
- uses : actions/checkout@v4
93
- name : ' Checkout Session desktop'
94
65
with :
95
- repository : ${{ github.event.inputs.SESSION_DESKTOP_REPO }}
96
- ref : ${{ github.event.inputs.BRANCH_TO_CHECKOUT_SESSION }}
97
- path : ' desktop'
66
+ lfs : true
98
67
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
68
+ - name : ' Download prebuilt session-desktop '
69
+ run : |
70
+ RUN_ID=$(echo "$DESKTOP_JOB_URL" | sed -E 's|.*/runs/([0-9]+).*|\1|')
71
+ echo "Run ID: $RUN_ID"
103
72
104
- - name : Install node
105
- uses : actions/setup-node@v3
106
- with :
107
- node-version-file : ' desktop/.nvmrc '
73
+ response=$(curl -s -H "Authorization: Bearer $PAT_TOKEN" \
74
+ -H "Accept: application/vnd.github+json" \
75
+ "https://api.github.com/repos/session-foundation/session-desktop/actions/runs/$RUN_ID/artifacts")
76
+ echo "response: $response"
108
77
109
- - uses : actions/setup-python@v4
110
- with :
111
- python-version : ' 3.12 '
78
+ artifact_url=$(echo "$response" | jq -r \
79
+ --arg name "$ARTIFACT_NAME" \
80
+ '.artifacts[] | select(.name == $name) | .archive_download_url')
112
81
113
- - name : Install setuptools for python 3.12
114
- shell : bash
115
- run : python -m pip install --upgrade pip setuptools
116
82
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 }}
83
+ echo "Session desktop Artifact URL: $artifact_url"
123
84
124
- - name : Install yarn
125
- run : |
126
- npm install -g yarn
85
+ curl -L \
86
+ -H "Authorization: token $PAT_TOKEN" \
87
+ -H "Accept: application/vnd.github+json" \
88
+ -o artifact.zip \
89
+ $artifact_url
127
90
128
- - name : List desktop folder
129
- run : |
130
- pwd
131
- ls -la desktop
91
+ unzip artifact.zip
132
92
133
- - name : List playwright folder
93
+ - name : ' print files '
134
94
run : |
135
- pwd
136
- ls -la playwright
137
-
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
95
+ ls -l
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
112
+ cd $GITHUB_WORKSPACE
161
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
117
+ DEBUG="pw:*" PRINT_ONGOING_TESTS=1 SESSION_DESKTOP_ROOT=$GITHUB_WORKSPACE/desktop nice ionice xvfb-run --auto-servernum --server-num=1 --server-args='-screen 0, 1920x1080x24' yarn test
167
118
# DEBUG="pw:*"
168
119
169
120
- name : Kill all running electron app
0 commit comments