57
57
required : false
58
58
description : " Whether or not to upload e2e test logs."
59
59
type : boolean
60
- default : false
60
+ default : true
61
61
62
62
workflow_dispatch :
63
63
inputs :
83
83
permissions :
84
84
id-token : write
85
85
contents : read
86
+ packages : read
86
87
87
88
jobs :
89
+
88
90
e2e-linux :
89
91
name : ${{ inputs.display_name || 'e2e-linux' }}
90
92
timeout-minutes : 120
91
93
runs-on : ubuntu-latest-8x
94
+ container :
95
+ image : ghcr.io/posit-dev/positron-ubuntu24-amd64:21
96
+ options : --user 0:0
97
+ # Static PAT is needed because the bot can't pass a token to the job for security reasons
98
+ credentials :
99
+ username : ${{ secrets.POSITRON_GITHUB_USER }}
100
+ password : ${{ secrets.POSITRON_GITHUB_PAT }}
92
101
services :
93
102
postgres :
94
- image : postgres:latest
103
+ image : ghcr.io/posit-dev/positron-postgres-initialized:21
104
+ credentials :
105
+ username : ${{ secrets.POSITRON_GITHUB_USER }}
106
+ password : ${{ secrets.POSITRON_GITHUB_PAT }}
95
107
ports :
96
108
- 5432:5432
97
109
env :
@@ -111,6 +123,8 @@ jobs:
111
123
E2E_POSTGRES_DB : ${{ secrets.E2E_POSTGRES_DB }}
112
124
E2E_CONNECT_SERVER : ${{ secrets.E2E_CONNECT_SERVER}}
113
125
E2E_CONNECT_APIKEY : ${{ secrets.E2E_CONNECT_APIKEY}}
126
+ R_LIBS_SITE : /usr/local/lib/R/site-library
127
+ R_LIBS_USER : /usr/local/lib/R/site-library
114
128
steps :
115
129
- uses : actions/checkout@v4
116
130
@@ -123,31 +137,10 @@ jobs:
123
137
OP_SERVICE_ACCOUNT_TOKEN : ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }}
124
138
ANTHROPIC_API_KEY : " op://Positron/Anthropic/credential"
125
139
126
- - uses : actions/setup-node@v4
127
- with :
128
- node-version-file : .nvmrc
129
-
130
- - name : Download sample database
131
- run : |
132
- wget https://raw.githubusercontent.com/neondatabase/postgres-sample-dbs/main/periodic_table.sql
133
-
134
- - name : Connect to PostgreSQL and load sample data
135
- env :
136
- PGHOST : localhost
137
- PGPORT : 5432
138
- PGUSER : ${{ secrets.E2E_POSTGRES_USER }}
139
- PGPASSWORD : ${{ secrets.E2E_POSTGRES_PASSWORD }}
140
- PGDATABASE : ${{ secrets.E2E_POSTGRES_DB }}
141
- run : |
142
- psql -v ON_ERROR_STOP=1 -f periodic_table.sql
143
-
144
140
- name : Transform to Playwright tags $PW_TAGS
145
141
run : bash scripts/pr-tags-transform.sh ${{ inputs.project}} "${{ inputs.grep }}"
146
142
shell : bash
147
143
148
- - name : Cache node_modules, build, extensions, and remote
149
- uses : ./.github/actions/cache-multi-paths
150
-
151
144
- name : Attempt 1 - Setup Build and Compile
152
145
id : attempt1
153
146
uses : ./.github/actions/setup-build-env
@@ -180,8 +173,6 @@ jobs:
180
173
with :
181
174
aws-role-to-assume : ${{ secrets.QA_AWS_RO_ROLE }}
182
175
aws-region : ${{ secrets.QA_AWS_REGION }}
183
- github-token : ${{ secrets.GITHUB_TOKEN }}
184
- install_undetectable_interpreters : ${{ inputs.install_undetectable_interpreters }}
185
176
186
177
# Preloading ensures the Node.js binary is fully built and ready before
187
178
# any parallel processes start, preventing runtime conflicts
@@ -196,10 +187,11 @@ jobs:
196
187
run : sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0
197
188
198
189
- name : Run Playwright Tests (Electron)
190
+ shell : bash
199
191
env :
200
- POSITRON_PY_VER_SEL : 3.12.6
192
+ POSITRON_PY_VER_SEL : " 3.12.11 (Venv: .venv) "
201
193
POSITRON_R_VER_SEL : 4.4.0
202
- POSITRON_PY_ALT_VER_SEL : " 3.13.0 (Pyenv) "
194
+ POSITRON_PY_ALT_VER_SEL : " 3.13.0"
203
195
POSITRON_R_ALT_VER_SEL : 4.4.2
204
196
POSITRON_HIDDEN_PY : " 3.12.10 (Conda)"
205
197
POSITRON_HIDDEN_R : 4.4.1
@@ -249,12 +241,12 @@ jobs:
249
241
echo "Final --grep-invert argument: $GREP_INVERT_ARG"
250
242
251
243
# Don't run this test in parallel & don't allow skipping it
252
- echo "Running: DISPLAY=:10 npx playwright test test/e2e/tests/extensions/bootstrap-extensions.test.ts --project ${{ inputs.project }} --reporter=null"
253
- DISPLAY=:10 npx playwright test test/e2e/tests/extensions/bootstrap-extensions.test.ts --project ${{ inputs.project }} --reporter=null
244
+ echo "Running: npx playwright test test/e2e/tests/extensions/bootstrap-extensions.test.ts --project ${{ inputs.project }} --reporter=null"
245
+ npx playwright test test/e2e/tests/extensions/bootstrap-extensions.test.ts --project ${{ inputs.project }} --reporter=null
254
246
255
247
# Run the Playwright test command directly using eval
256
- echo "Running: DISPLAY=:10 npx playwright test --project ${{ inputs.project }} --workers 2 $GREP_ARG $GREP_INVERT_ARG --repeat-each ${{ inputs.repeat_each }} --max-failures 10"
257
- eval DISPLAY=:10 SKIP_BOOTSTRAP=true SKIP_CLONE=true npx playwright test --project ${{ inputs.project }} --workers 2 $GREP_ARG $GREP_INVERT_ARG --repeat-each ${{ inputs.repeat_each }} --max-failures 10
248
+ echo "Running: npx playwright test --project ${{ inputs.project }} --workers 2 $GREP_ARG $GREP_INVERT_ARG --repeat-each ${{ inputs.repeat_each }} --max-failures 10"
249
+ eval SKIP_BOOTSTRAP=true SKIP_CLONE=true npx playwright test --project ${{ inputs.project }} --workers 2 $GREP_ARG $GREP_INVERT_ARG --repeat-each ${{ inputs.repeat_each }} --max-failures 10
258
250
259
251
- name : Upload Playwright Report to S3
260
252
if : ${{ success() || failure() }}
@@ -263,28 +255,10 @@ jobs:
263
255
role-to-assume : ${{ secrets.AWS_TEST_REPORTS_ROLE }}
264
256
report-dir : ${{ env.REPORT_DIR }}
265
257
266
- - name : Install trcli
267
- if : ${{ inputs.report_testrail }}
268
- shell : bash
269
- run : sudo apt-get update && sudo apt-get install -y python3-pip && pip3 install trcli
270
-
271
- - name : Upload Test Results to TestRail
272
- if : ${{ inputs.report_testrail }}
273
- shell : bash
274
- run : |
275
- TESTRAIL_TITLE="$(date +'%Y-%m-%d') ${{ env.TESTRAIL_TITLE }} - $GITHUB_REF_NAME"
276
- echo "TESTRAIL_TITLE=$TESTRAIL_TITLE" >> $GITHUB_ENV
277
- trcli --host "https://posit.testrail.io/" --project "${{ env.TESTRAIL_PROJECT }}" --username testrailautomation@posit.co --key "${{ env.TESTRAIL_API_KEY }}" parse_junit --file "./test-results/junit.xml" --case-matcher name --title "$TESTRAIL_TITLE" --close-run
278
- env :
279
- TESTRAIL_TITLE : ${{ inputs.project }}
280
- TESTRAIL_PROJECT : " Positron"
281
- TESTRAIL_API_KEY : ${{ secrets.TESTRAIL_API_KEY }}
282
-
283
258
- name : Upload Test Logs
284
259
if : ${{ always() && inputs.upload_logs }}
285
260
uses : actions/upload-artifact@v4
286
261
with :
287
262
name : ${{ inputs.project }}-logs
288
263
path : test-logs
289
264
if-no-files-found : ignore
290
-
0 commit comments