Skip to content

Bump WC tested up to version to 9.5.0 #38730

Bump WC tested up to version to 9.5.0

Bump WC tested up to version to 9.5.0 #38730

Workflow file for this run

name: Compatibility - WC, WP and PHP
on:
pull_request
env:
WC_MIN_SUPPORTED_VERSION: '7.6.0'
WP_MIN_SUPPORTED_VERSION: '6.0'
PHP_MIN_SUPPORTED_VERSION: '7.3'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
generate-wc-compat-matrix:
name: "Generate the matrix for woocommerce compatibility dynamically"
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.generate_matrix.outputs.matrix }}
steps:
- name: "Generate matrix"
id: generate_matrix
run: |
WC_VERSIONS=$( echo "[\"$WC_MIN_SUPPORTED_VERSION\", \"latest\", \"beta\"]" )
MATRIX_INCLUDE=$( echo "[{\"woocommerce\":\"$WC_MIN_SUPPORTED_VERSION\",\"wordpress\":\"$WP_MIN_SUPPORTED_VERSION\",\"gutenberg\":\"13.6.0\",\"php\":\"$PHP_MIN_SUPPORTED_VERSION\"}]" )
echo "matrix={\"woocommerce\":$WC_VERSIONS,\"wordpress\":[\"latest\"],\"gutenberg\":[\"latest\"],\"php\":[\"7.4\"], \"include\":$MATRIX_INCLUDE}" >> $GITHUB_OUTPUT
woocommerce-compatibility:
name: "WC compatibility"
needs: generate-wc-compat-matrix
runs-on: ubuntu-latest
env:
WP_VERSION: ${{ matrix.wordpress }}
WC_VERSION: ${{ matrix.woocommerce }}
GUTENBERG_VERSION: ${{ matrix.gutenberg }}
strategy:
fail-fast: false
max-parallel: 10
matrix: ${{ fromJSON(needs.generate-wc-compat-matrix.outputs.matrix) }}
steps:
# clone the repository
- uses: actions/checkout@v4
# enable dependencies caching
- uses: actions/cache@v4
with:
path: ~/.cache/composer/
key: ${{ runner.os }}-composer-${{ hashFiles('composer.json') }}-${{ hashFiles('composer.lock') }}
# setup PHP, but without debug extensions for reasonable performance
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
tools: composer
coverage: none
# run CI checks
- run: bash bin/run-ci-tests.bash
generate-wc-compat-beta-matrix:
name: "Generate the matrix for compatibility-woocommerce-beta dynamically"
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.generate_matrix.outputs.matrix }}
steps:
- name: "Generate matrix"
id: generate_matrix
run: |
PHP_VERSIONS=$( echo "[\"7.4\", \"8.0\", \"8.1\"]" )
echo "matrix={\"woocommerce\":[\"beta\"],\"wordpress\":[\"latest\"],\"gutenberg\":[\"latest\"],\"php\":$PHP_VERSIONS}" >> $GITHUB_OUTPUT
# a dedicated job, as allowed to fail
compatibility-woocommerce-beta:
name: Environment - WC beta
needs: generate-wc-compat-beta-matrix
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix: ${{ fromJSON(needs.generate-wc-compat-beta-matrix.outputs.matrix) }}
env:
WP_VERSION: ${{ matrix.wordpress }}
WC_VERSION: ${{ matrix.woocommerce }}
GUTENBERG_VERSION: ${{ matrix.gutenberg }}
steps:
# clone the repository
- uses: actions/checkout@v4
# enable dependencies caching
- uses: actions/cache@v4
with:
path: ~/.cache/composer/
key: ${{ runner.os }}-composer-${{ hashFiles('composer.json') }}-${{ hashFiles('composer.lock') }}
# setup PHP, but without debug extensions for reasonable performance
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
tools: composer
coverage: none
# run CI checks
- run: bash bin/run-ci-tests.bash