fix: correct option type for duplicate payment method dismissed notic… #126
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: QIT E2E Tests | |
| on: | |
| push: | |
| branches: | |
| - develop | |
| - trunk | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| name: Build plugin | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up repository | |
| uses: ./.github/actions/setup-repo | |
| - name: Build the plugin | |
| uses: ./.github/actions/build | |
| - name: Upload plugin artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: woocommerce-payments-${{ github.run_id }} | |
| path: woocommerce-payments.zip | |
| retention-days: 1 | |
| generate-matrix: | |
| name: Generate test matrix | |
| runs-on: ubuntu-latest | |
| outputs: | |
| matrix: ${{ steps.generate.outputs.matrix }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Generate matrix | |
| id: generate | |
| run: | | |
| # Get WC versions from matrix script | |
| SCRIPT_RESULT=$(.github/scripts/generate-wc-matrix.sh) | |
| L1_VERSION=$(echo "$SCRIPT_RESULT" | jq -r '.metadata.l1_version') | |
| BETA_VERSION=$(echo "$SCRIPT_RESULT" | jq -r '.metadata.beta_version') | |
| RC_VERSION=$(echo "$SCRIPT_RESULT" | jq -r '.metadata.rc_version') | |
| # Normalize null values | |
| [[ "$BETA_VERSION" == "null" ]] && BETA_VERSION="" | |
| [[ "$RC_VERSION" == "null" ]] && RC_VERSION="" | |
| echo "L-1 version: $L1_VERSION" >&2 | |
| [[ -n "$BETA_VERSION" ]] && echo "Beta version: $BETA_VERSION" >&2 || echo "No beta version available" >&2 | |
| [[ -n "$RC_VERSION" ]] && echo "RC version: $RC_VERSION" >&2 || echo "No RC version available" >&2 | |
| # Build scheduled matrix: L-1 + latest + nightly WC, PHP 8.3, all projects | |
| # All combinations use WP latest by default | |
| MATRIX_ENTRIES=() | |
| for wc_version in "$L1_VERSION" "latest" "nightly"; do | |
| for project in "shopper" "merchant" "subscriptions"; do | |
| MATRIX_ENTRIES+=("{\"woocommerce\":\"$wc_version\",\"wordpress\":\"latest\",\"php\":\"8.3\",\"project\":\"$project\"}") | |
| done | |
| done | |
| # Add beta version tests (if available) | |
| if [[ -n "$BETA_VERSION" ]]; then | |
| for project in "shopper" "merchant" "subscriptions"; do | |
| MATRIX_ENTRIES+=("{\"woocommerce\":\"$BETA_VERSION\",\"wordpress\":\"latest\",\"php\":\"8.3\",\"project\":\"$project\"}") | |
| done | |
| fi | |
| # Add RC version tests (if available) | |
| if [[ -n "$RC_VERSION" ]]; then | |
| for project in "shopper" "merchant" "subscriptions"; do | |
| MATRIX_ENTRIES+=("{\"woocommerce\":\"$RC_VERSION\",\"wordpress\":\"latest\",\"php\":\"8.3\",\"project\":\"$project\"}") | |
| done | |
| fi | |
| # Add WP nightly tests (WP nightly + WC latest + PHP 8.3 only) | |
| for project in "shopper" "merchant" "subscriptions"; do | |
| MATRIX_ENTRIES+=("{\"woocommerce\":\"latest\",\"wordpress\":\"nightly\",\"php\":\"8.3\",\"project\":\"$project\"}") | |
| done | |
| # Add PHP 8.4 tests (WC nightly + PHP 8.4 to catch newest PHP compatibility issues) | |
| for project in "shopper" "merchant" "subscriptions"; do | |
| MATRIX_ENTRIES+=("{\"woocommerce\":\"nightly\",\"wordpress\":\"latest\",\"php\":\"8.4\",\"project\":\"$project\"}") | |
| done | |
| MATRIX_JSON=$(printf '%s\n' "${MATRIX_ENTRIES[@]}" | jq -s '{"include": .}' -c) | |
| echo "matrix=$MATRIX_JSON" >> $GITHUB_OUTPUT | |
| qit-e2e: | |
| name: "${{ matrix.project }} | WP ${{ matrix.wordpress }} | WC ${{ matrix.woocommerce }} | PHP ${{ matrix.php }}" | |
| needs: [build, generate-matrix] | |
| strategy: | |
| fail-fast: false | |
| matrix: ${{ fromJSON(needs.generate-matrix.outputs.matrix) }} | |
| uses: ./.github/workflows/qit-e2e-run.yml | |
| with: | |
| woocommerce-version: ${{ matrix.woocommerce }} | |
| wordpress-version: ${{ matrix.wordpress }} | |
| php-version: ${{ matrix.php }} | |
| artifact-name: woocommerce-payments-${{ github.run_id }} | |
| playwright-project: ${{ matrix.project }} | |
| secrets: | |
| QIT_CI_USER: ${{ secrets.QIT_CI_USER }} | |
| QIT_CI_SECRET: ${{ secrets.QIT_CI_SECRET }} | |
| E2E_QIT_JP_SITE_ID: ${{ secrets.E2E_QIT_JP_SITE_ID }} | |
| E2E_QIT_JP_BLOG_TOKEN: ${{ secrets.E2E_QIT_JP_BLOG_TOKEN }} | |
| E2E_QIT_JP_USER_TOKEN: ${{ secrets.E2E_QIT_JP_USER_TOKEN }} |