diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 4848df6..d717271 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -56,6 +56,30 @@ jobs: - name: Install dependencies run: composer install --prefer-dist --no-interaction + - name: Create override wp-env + if: matrix.wp-versions != 'latest' + env: + PHP_VERSION: ${{ matrix.php-versions }} + WP_VERSION: ${{ matrix.wp-versions }} + run: | + cat < .wp-env.override.json + { + "phpVersion": "$PHP_VERSION", + "core": "WordPress/WordPress#$WP_VERSION" + } + EOF + + - name: Create override wp-env + if: matrix.wp-versions == 'latest' + env: + PHP_VERSION: ${{ matrix.php-versions }} + run: | + cat < .wp-env.override.json + { + "phpVersion": "$PHP_VERSION" + } + EOF + - name: Starting WP ENV run: npm run wp-env:start