|
38 | 38 | type: boolean
|
39 | 39 | default: false
|
40 | 40 |
|
| 41 | + skip_tags: |
| 42 | + required: false |
| 43 | + description: "Comma-separated list of tags to skip." |
| 44 | + type: string |
| 45 | + default: "" |
| 46 | + |
41 | 47 | workflow_dispatch:
|
42 | 48 | inputs:
|
43 | 49 | grep:
|
|
50 | 56 | description: "Run each test N times, defaults to one."
|
51 | 57 | default: 1
|
52 | 58 | type: number
|
| 59 | + skip_tags: |
| 60 | + required: false |
| 61 | + description: "Comma-separated list of tags to skip." |
| 62 | + type: string |
| 63 | + default: "@:nightly-only" |
53 | 64 |
|
54 | 65 | permissions:
|
55 | 66 | id-token: write
|
@@ -208,9 +219,40 @@ jobs:
|
208 | 219 | ENABLE_CURRENTS_REPORTER: ${{ inputs.report_currents }}
|
209 | 220 | CURRENTS_PROJECT_ID: ${{ vars.CURRENTS_PROJECT_ID }}
|
210 | 221 | 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 | +
|
211 | 251 | export SKIP_BOOTSTRAP=true
|
212 | 252 | 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 |
214 | 256 |
|
215 | 257 | - name: Upload Playwright Report to S3
|
216 | 258 | if: ${{ success() || failure() }}
|
|
0 commit comments