|
15 | 15 | - e2e:test:critical |
16 | 16 | - e2e:test:stress |
17 | 17 | - e2e:test:all |
| 18 | + - e2e:test:all:parallel |
18 | 19 | XRAY_TEST_EXEC_KEY: |
19 | 20 | description: 'Xray Test Execution Key' |
20 | 21 | required: false |
|
41 | 42 |
|
42 | 43 | e2e-playwright: |
43 | 44 | name: Run Playwright E2E Tests |
| 45 | + if: ${{ inputs.TEST_SUITE != 'e2e:test:all:parallel' }} |
44 | 46 | needs: build |
45 | 47 | uses: inpsyde/reusable-workflows/.github/workflows/test-playwright.yml@fix/test-playwright |
46 | 48 | with: |
|
75 | 77 | ENV_FILE_DATA: ${{ secrets.QA_ENV_FILE }} |
76 | 78 | NPM_REGISTRY_TOKEN: ${{ secrets.DEPLOYBOT_GITHUB_TOKEN_PACKAGES }} |
77 | 79 | COMPOSER_AUTH_JSON: ${{ secrets.COMPOSER_AUTH_JSON }} |
| 80 | + |
| 81 | + e2e-playwright-parallel: |
| 82 | + name: Run Playwright E2E Tests / ${{ matrix.shard }} |
| 83 | + if: ${{ inputs.TEST_SUITE == 'e2e:test:all:parallel' }} |
| 84 | + needs: build |
| 85 | + strategy: |
| 86 | + fail-fast: false |
| 87 | + matrix: |
| 88 | + shard: |
| 89 | + - plugin-foundation |
| 90 | + - onboarding-settings |
| 91 | + - transactions |
| 92 | + - refund |
| 93 | + - vaulting |
| 94 | + - subscription |
| 95 | + uses: inpsyde/reusable-workflows/.github/workflows/test-playwright.yml@fix/test-playwright |
| 96 | + with: |
| 97 | + WORK_DIR: tests/qa |
| 98 | + PLAYWRIGHT_SCRIPT: e2e:test:shard:${{ matrix.shard }} |
| 99 | + ARTIFACT_PATH: | |
| 100 | + tests/qa/artifacts/* |
| 101 | + tests/qa/playwright-report/ |
| 102 | + tests/qa/test-results/ |
| 103 | + ARTIFACT_INCLUDE_HIDDEN_FILES: true |
| 104 | + NODE_VERSION: 22 |
| 105 | + PLAYWRIGHT_BROWSER_ARGS: 'chromium --with-deps' |
| 106 | + XRAY_TEST_EXEC_KEY: ${{ inputs.XRAY_TEST_EXEC_KEY }} |
| 107 | + PRE_SCRIPT: | |
| 108 | + # 1. Download and unzip the built plugin |
| 109 | + gh run download ${{ github.run_id }} -p "woocommerce-paypal-payments-*" -D resources/files |
| 110 | + pushd resources/files |
| 111 | + mv woocommerce-paypal-payments-*/woocommerce-paypal-payments . |
| 112 | + zip -r woocommerce-paypal-payments.zip woocommerce-paypal-payments |
| 113 | + rm -rf woocommerce-paypal-payments woocommerce-paypal-payments-*/ |
| 114 | + popd |
| 115 | +
|
| 116 | + # 2. Add private composer repository and download WooCommerce Subscriptions |
| 117 | + pushd ../../ |
| 118 | + composer config repositories.repo-name composer https://repo.packagist.com/inpsyde/payment-gateways/ |
| 119 | + composer require inpsyde-mirror/woocommerce-subscriptions |
| 120 | + popd |
| 121 | +
|
| 122 | + # 3. Setup wp-env |
| 123 | + npm run e2e:setup:env |
| 124 | + secrets: |
| 125 | + ENV_FILE_DATA: ${{ secrets.QA_ENV_FILE }} |
| 126 | + NPM_REGISTRY_TOKEN: ${{ secrets.DEPLOYBOT_GITHUB_TOKEN_PACKAGES }} |
| 127 | + COMPOSER_AUTH_JSON: ${{ secrets.COMPOSER_AUTH_JSON }} |
0 commit comments