Skip to content

Commit 2c589dd

Browse files
Jonv-nightly-only-windows (#8817)
Adds skipping nightly-only tests on windows ### QA Notes See example run https://github.com/posit-dev/positron/actions/runs/16711731113 I unskipped the inspect-ai test for the above run and it didn't execute <!-- Positron team members: please add relevant e2e test tags, so the tests can be run when you open this pull request. - Instructions: https://github.com/posit-dev/positron/blob/main/test/e2e/README.md#pull-requests-and-test-tags - Available tags: https://github.com/posit-dev/positron/blob/main/test/e2e/infra/test-runner/test-tags.ts --> <!-- Add additional information for QA on how to validate the change, paying special attention to the level of risk, adjacent areas that could be affected by the change, and any important contextual information not present in the linked issues. -->
1 parent 9505ca0 commit 2c589dd

File tree

3 files changed

+45
-1
lines changed

3 files changed

+45
-1
lines changed

.github/workflows/test-e2e-windows.yml

Lines changed: 43 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,12 @@ on:
3838
type: boolean
3939
default: false
4040

41+
skip_tags:
42+
required: false
43+
description: "Comma-separated list of tags to skip."
44+
type: string
45+
default: ""
46+
4147
workflow_dispatch:
4248
inputs:
4349
grep:
@@ -50,6 +56,11 @@ on:
5056
description: "Run each test N times, defaults to one."
5157
default: 1
5258
type: number
59+
skip_tags:
60+
required: false
61+
description: "Comma-separated list of tags to skip."
62+
type: string
63+
default: "@:nightly-only"
5364

5465
permissions:
5566
id-token: write
@@ -208,9 +219,40 @@ jobs:
208219
ENABLE_CURRENTS_REPORTER: ${{ inputs.report_currents }}
209220
CURRENTS_PROJECT_ID: ${{ vars.CURRENTS_PROJECT_ID }}
210221
run: |
222+
echo "Processing skip_tags input: '${{ inputs.skip_tags }}'"
223+
224+
# Convert comma-separated skip_tags input into a pipe-separated string
225+
SKIP_TAGS_PATTERN=$(echo "${{ inputs.skip_tags }}" | sed 's/,/|/g')
226+
227+
# Build a single lookahead regex pattern
228+
if [ -n "$SKIP_TAGS_PATTERN" ]; then
229+
SKIP_TAGS_REGEX="(?=.*($SKIP_TAGS_PATTERN|@:web-only))"
230+
else
231+
SKIP_TAGS_REGEX="(?=.*(@:web-only))"
232+
fi
233+
234+
# Build the --grep-invert argument if needed
235+
GREP_INVERT_ARG=""
236+
if [ -n "$SKIP_TAGS_REGEX" ]; then
237+
GREP_INVERT_ARG="--grep-invert \"$SKIP_TAGS_REGEX\""
238+
fi
239+
240+
# Build the --grep argument only if PW_TAGS is non-empty
241+
if [ -z "${PW_TAGS}" ]; then
242+
GREP_ARG=""
243+
else
244+
GREP_ARG="--grep \"${PW_TAGS}\""
245+
fi
246+
247+
# Log the arguments
248+
echo "Final --grep argument: $GREP_ARG"
249+
echo "Final --grep-invert argument: $GREP_INVERT_ARG"
250+
211251
export SKIP_BOOTSTRAP=true
212252
export SKIP_CLONE=true
213-
npx playwright test --project "e2e-windows" --grep "${PW_TAGS}" --workers 2 --repeat-each ${{ inputs.repeat_each }} --max-failures 10
253+
# Run the Playwright test command directly using eval
254+
echo "Running: npx playwright test --project \"e2e-windows\" --workers 2 $GREP_ARG $GREP_INVERT_ARG --repeat-each ${{ inputs.repeat_each }} --max-failures 10"
255+
eval npx playwright test --project \"e2e-windows\" --workers 2 $GREP_ARG $GREP_INVERT_ARG --repeat-each ${{ inputs.repeat_each }} --max-failures 10
214256
215257
- name: Upload Playwright Report to S3
216258
if: ${{ success() || failure() }}

.github/workflows/test-merge.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ jobs:
3030
display_name: "electron (windows)"
3131
currents_tags: "merge,electron/windows"
3232
report_testrail: false
33+
skip_tags: "@:nightly-only"
3334
upload_logs: false
3435
secrets: inherit
3536

.github/workflows/test-pull-request.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ jobs:
5656
currents_tags: "pull-request,electron/windows,${{ needs.pr-tags.outputs.tags }}"
5757
report_testrail: false
5858
report_currents: false
59+
skip_tags: "@:nightly-only"
5960
upload_logs: false
6061
secrets: inherit
6162

0 commit comments

Comments
 (0)