Skip to content

E2E Tests - All

E2E Tests - All #23844

Workflow file for this run

name: E2E Tests - All
on:
schedule:
- cron: '0 */6 * * *'
push:
branches:
- develop
- trunk
workflow_dispatch:
env:
E2E_GH_TOKEN: ${{ secrets.E2E_GH_TOKEN }}
WCP_DEV_TOOLS_REPO: ${{ secrets.WCP_DEV_TOOLS_REPO }}
WCP_DEV_TOOLS_BRANCH: 'trunk'
TRANSACT_PLATFORM_SERVER_REPO: ${{ secrets.TRANSACT_PLATFORM_SERVER_REPO }}
WC_SUBSCRIPTIONS_REPO: ${{ secrets.WC_SUBSCRIPTIONS_REPO }}
E2E_BLOG_ID: ${{ secrets.E2E_BLOG_ID }}
E2E_BLOG_TOKEN: ${{ secrets.E2E_BLOG_TOKEN }}
E2E_USER_TOKEN: ${{ secrets.E2E_USER_TOKEN }}
WC_E2E_SCREENSHOTS: 1
E2E_SLACK_CHANNEL: ${{ secrets.E2E_SLACK_CHANNEL }}
E2E_SLACK_TOKEN: ${{ secrets.E2E_SLACK_TOKEN }}
E2E_USE_LOCAL_SERVER: false
E2E_RESULT_FILEPATH: 'tests/e2e/results.json'
WC_MIN_SUPPORTED_VERSION: '7.6.0'
NODE_ENV: 'test'
FORCE_E2E_DEPS_SETUP: true
jobs:
generate-matrix:
name: "Generate the matrix for subscriptions-tests dynamically"
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.generate_matrix.outputs.matrix }}
steps:
- name: "Generate matrix"
id: generate_matrix
run: |
WC_VERSIONS=$( echo "[\"7.7.0\", \"latest\", \"beta\"]" )
echo "matrix={\"woocommerce\":$WC_VERSIONS,\"test_groups\":[\"wcpay\", \"subscriptions\"],\"test_branches\":[\"merchant\", \"shopper\"]}" >> $GITHUB_OUTPUT
# Run WCPay & subscriptions tests against specific WC versions
wcpay-subscriptions-tests:
runs-on: ubuntu-latest
needs: generate-matrix
strategy:
fail-fast: false
matrix: ${{ fromJSON(needs.generate-matrix.outputs.matrix) }}
name: WC - ${{ matrix.woocommerce }} | ${{ matrix.test_groups }} - ${{ matrix.test_branches }}
env:
E2E_WP_VERSION: 'latest'
E2E_WC_VERSION: ${{ matrix.woocommerce }}
E2E_GROUP: ${{ matrix.test_groups }}
E2E_BRANCH: ${{ matrix.test_branches }}
SKIP_WC_BLOCKS_TESTS: 1 # skip running blocks tests
steps:
- name: Checkout WCPay repository
uses: actions/checkout@v4
- name: Setup E2E environment
uses: ./.github/actions/e2e/env-setup
- name: Run tests, upload screenshots & logs
uses: ./.github/actions/e2e/run-log-tests
# Run tests against WC Checkout blocks & WC latest
# [TODO] Unskip blocks tests after investigating constant failures.
# blocks-tests:
# runs-on: ubuntu-latest
# name: WC - latest | blocks - shopper
# env:
# E2E_WP_VERSION: 'latest'
# E2E_WC_VERSION: 'latest'
# E2E_GROUP: 'blocks'
# E2E_BRANCH: 'shopper'
# SKIP_WC_SUBSCRIPTIONS_TESTS: 1 #skip installing & running subscriptions tests
# SKIP_WC_ACTION_SCHEDULER_TESTS: 1 #skip installing & running action scheduler tests
# steps:
# - name: Checkout WCPay repository
# uses: actions/checkout@v4
# - name: Setup E2E environment
# uses: ./.github/actions/e2e/env-setup
# - name: Run tests, upload screenshots & logs
# uses: ./.github/actions/e2e/run-log-tests
# Run tests against WP Nightly & WC latest
wp-nightly-tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
test_groups: [ 'wcpay', 'subscriptions' ] # [TODO] Unskip blocks tests after investigating constant failures.
test_branches: [ 'merchant', 'shopper' ]
name: WP - nightly | WC - latest | ${{ matrix.test_groups }} - ${{ matrix.test_branches }}
env:
E2E_WP_VERSION: 'nightly'
E2E_WC_VERSION: 'latest'
E2E_GROUP: ${{ matrix.test_groups }}
E2E_BRANCH: ${{ matrix.test_branches }}
steps:
- name: Checkout WCPay repository
uses: actions/checkout@v4
- name: Setup E2E environment
uses: ./.github/actions/e2e/env-setup
- name: Run tests, upload screenshots & logs
uses: ./.github/actions/e2e/run-log-tests