10
10
name : e2e tests (cypress)
11
11
runs-on : ubuntu-latest
12
12
env :
13
- DEBUG_CYPRESS : " false" # Set to true to enable extra logging
14
- ACTIONS_STEP_DEBUG : " false" # Set to false to suppress yaml warnings
13
+ DEBUG_CYPRESS : " false" # Set to true to enable extra logging and video recording replays
15
14
steps :
16
15
- name : Checkout code
17
16
uses : actions/checkout@v3
68
67
CONNECT_LICENSE : ${{ secrets.CONNECT_LICENSE }}
69
68
70
69
- name : " [DEBUG] Print host user and group info"
71
- if : always() && (env.DEBUG_CYPRESS == 'true' || env.ACTIONS_STEP_DEBUG == 'true' )
70
+ if : always() && (env.DEBUG_CYPRESS == 'true' || env.ACTIONS_STEP_DEBUG)
72
71
run : |
73
72
echo "USER: $(whoami)"
74
73
echo "UID: $(id -u)"
@@ -147,7 +146,7 @@ jobs:
147
146
done
148
147
149
148
- name : " [DEBUG] Print workspace file ownership before tests"
150
- if : always() && (env.DEBUG_CYPRESS == 'true' || env.ACTIONS_STEP_DEBUG == 'true' )
149
+ if : always() && (env.DEBUG_CYPRESS == 'true' || env.ACTIONS_STEP_DEBUG)
151
150
run : |
152
151
docker exec publisher-e2e.code-server ls -lR /home/coder/workspace || true
153
152
@@ -164,6 +163,7 @@ jobs:
164
163
CONNECT_LICENSE : ${{ secrets.CONNECT_LICENSE }}
165
164
CONNECT_CLOUD_ENV : ${{ env.CONNECT_CLOUD_ENV }} # defaults to staging
166
165
CI : true
166
+ DEBUG_CYPRESS : ${{ env.DEBUG_CYPRESS }}
167
167
168
168
- name : Upload Cypress screenshots on failure
169
169
uses : actions/upload-artifact@v4
@@ -173,21 +173,21 @@ jobs:
173
173
path : test/e2e/cypress/screenshots
174
174
if-no-files-found : ignore
175
175
176
- - name : Upload Cypress videos on failure
176
+ - name : " [DEBUG] Upload Cypress videos"
177
177
uses : actions/upload-artifact@v4
178
- if : failure( )
178
+ if : always() && (env.DEBUG_CYPRESS == 'true' || env.ACTIONS_STEP_DEBUG )
179
179
with :
180
180
name : cypress-videos
181
181
path : test/e2e/cypress/videos
182
182
if-no-files-found : ignore
183
183
184
184
- name : " [DEBUG] List installed VS Code extensions"
185
- if : always() && (env.DEBUG_CYPRESS == 'true' || env.ACTIONS_STEP_DEBUG == 'true' )
185
+ if : always() && (env.DEBUG_CYPRESS == 'true' || env.ACTIONS_STEP_DEBUG)
186
186
working-directory : test/e2e
187
187
run : docker compose exec code-server code-server --list-extensions --show-versions || true
188
188
189
189
- name : " [DEBUG] Display test/e2e directory tree"
190
- if : always() && (env.DEBUG_CYPRESS == 'true' || env.ACTIONS_STEP_DEBUG == 'true' )
190
+ if : always() && (env.DEBUG_CYPRESS == 'true' || env.ACTIONS_STEP_DEBUG)
191
191
run : |
192
192
echo "Directory tree for test/e2e:"
193
193
if command -v tree > /dev/null; then
@@ -197,7 +197,7 @@ jobs:
197
197
fi
198
198
199
199
- name : " [DEBUG] Print code-server logs"
200
- if : always() && (env.DEBUG_CYPRESS == 'true' || env.ACTIONS_STEP_DEBUG == 'true' )
200
+ if : always() && (env.DEBUG_CYPRESS == 'true' || env.ACTIONS_STEP_DEBUG)
201
201
run : |
202
202
echo "=== Code Server Log Files ==="
203
203
docker exec publisher-e2e.code-server bash -c 'find /root/.local -type f -name "*.log" 2>/dev/null | while read -r file; do echo "FILE: $file"; done'
@@ -207,20 +207,20 @@ jobs:
207
207
docker exec publisher-e2e.code-server bash -c 'find /root/.local -name "remoteexthost.log" -type f 2>/dev/null | head -n 1 | xargs cat | tail -n 50 || echo "No logs found"'
208
208
209
209
- name : " [DEBUG] Print Publisher extension logs"
210
- if : always() && (env.DEBUG_CYPRESS == 'true' || env.ACTIONS_STEP_DEBUG == 'true' )
210
+ if : always() && (env.DEBUG_CYPRESS == 'true' || env.ACTIONS_STEP_DEBUG)
211
211
run : |
212
212
echo "=== Finding Publisher logs ==="
213
213
docker exec publisher-e2e.code-server bash -c 'find /root -type f -name "*.log" 2>/dev/null | grep -i "posit\|publisher" || echo "No publisher logs found"'
214
214
docker exec publisher-e2e.code-server bash -c 'find /home -type f -name "*.log" 2>/dev/null | grep -i "posit\|publisher" || echo "No publisher logs found"'
215
215
echo "======================================="
216
216
217
217
- name : " [DEBUG] Print code-server container logs"
218
- if : always() && (env.DEBUG_CYPRESS == 'true' || env.ACTIONS_STEP_DEBUG == 'true' )
218
+ if : always() && (env.DEBUG_CYPRESS == 'true' || env.ACTIONS_STEP_DEBUG)
219
219
working-directory : test/e2e
220
220
run : docker compose logs code-server || true
221
221
222
222
- name : " [DEBUG] List /home/coder directory contents"
223
- if : always() && (env.DEBUG_CYPRESS == 'true' || env.ACTIONS_STEP_DEBUG == 'true' )
223
+ if : always() && (env.DEBUG_CYPRESS == 'true' || env.ACTIONS_STEP_DEBUG)
224
224
run : docker exec publisher-e2e.code-server ls -lR /home/coder || true
225
225
226
226
- name : Stop containers
0 commit comments