Skip to content

Commit

Permalink
Merge pull request #841 from newfold-labs/release/2.12.4
Browse files Browse the repository at this point in the history
Release/2.12.4
  • Loading branch information
crodriguezbrito authored Dec 18, 2024
2 parents 75bb220 + 0321b64 commit 5c21147
Show file tree
Hide file tree
Showing 16 changed files with 894 additions and 753 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/cypress-matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,11 @@ jobs:
echo '{"wpVersion": "${{ matrix.wpVersion }}","phpVersion": "${{ matrix.phpVersion }}"}' > cypress.env.json
- name: Install WordPress
run: npx wp-env start --debug
uses: nick-fields/retry@v3
with:
timeout_minutes: 4
max_attempts: 3
command: npx wp-env start --debug

- name: Run Cypress Tests
if: ${{ github.repository != 'newfold-labs/wp-plugin-hostgator' || github.actor == 'dependabot[bot]' }}
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/cypress-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,11 @@ jobs:
run: echo '{"config":{"WP_DEBUG_DISPLAY":false},"plugins":["${{ steps.workflow.outputs.DIST }}/${{ steps.workflow.outputs.PACKAGE }}"]}' > .wp-env.override.json

- name: Install WordPress
run: npx wp-env start --debug
uses: nick-fields/retry@v3
with:
timeout_minutes: 4
max_attempts: 3
command: npx wp-env start --debug

- name: Run Cypress Tests
if: ${{ github.repository != 'newfold-labs/wp-plugin-hostgator' || github.actor == 'dependabot[bot]' }}
Expand Down
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,20 +74,20 @@
"doctrine/inflector": "1.4.4 as 1.3.1",
"newfold-labs/wp-module-activation": "^1.0.5",
"newfold-labs/wp-module-atomic": "^1.3",
"newfold-labs/wp-module-coming-soon": "^1.3.1",
"newfold-labs/wp-module-coming-soon": "^1.3.2",
"newfold-labs/wp-module-context": "^1.0.1",
"newfold-labs/wp-module-data": "^2.6.7",
"newfold-labs/wp-module-data": "^2.6.8",
"newfold-labs/wp-module-deactivation": "^1.2.3",
"newfold-labs/wp-module-ecommerce": "^1.4.4",
"newfold-labs/wp-module-features": "^1.4.2",
"newfold-labs/wp-module-global-ctb": "^1.0.13",
"newfold-labs/wp-module-help-center": "^2.2.1",
"newfold-labs/wp-module-help-center": "^2.2.2",
"newfold-labs/wp-module-loader": "^1.0.10",
"newfold-labs/wp-module-marketplace": "^2.4.0",
"newfold-labs/wp-module-migration": "^1.0.12",
"newfold-labs/wp-module-notifications": "^1.6.6",
"newfold-labs/wp-module-onboarding": "^2.5.5",
"newfold-labs/wp-module-patterns": "^2.8.0",
"newfold-labs/wp-module-patterns": "^2.8.1",
"newfold-labs/wp-module-performance": "2.0.1 as 1.9.9",
"newfold-labs/wp-module-runtime": "^1.0.12",
"newfold-labs/wp-module-secure-passwords": "^1.1.1",
Expand Down
82 changes: 41 additions & 41 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

62 changes: 52 additions & 10 deletions cypress.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ module.exports = defineConfig({
// You may want to clean this up later by importing these.
setupNodeEvents(on, config) {

const semver = require('semver');

// Ensure that the base URL is always properly set.
if (config.env && config.env.baseUrl) {
config.baseUrl = config.env.baseUrl;
Expand All @@ -56,17 +54,27 @@ module.exports = defineConfig({
}
}

// Exclude tests for WordPress lower than 6.5 (6.4 or 6.3) or PHP lower than 7.4 (7.1, 7.2 and 7.3)
if (
semver.satisfies( config.env.wpSemverVersion, '<6.5.0' ) ||
semver.satisfies( config.env.phpSemverVersion, '<7.4.0' )
) {
// Tests require Wondor Theme, exclude if not supported due to WP or PHP versions
if ( ! supportsWonderTheme( config.env ) ) {
config.excludeSpecPattern = config.excludeSpecPattern.concat( [
'vendor/newfold-labs/wp-module-onboarding/tests/cypress/integration/**', // Onboarding requires Wonder Theme
'vendor/newfold-labs/wp-module-ecommerce/tests/cypress/integration/Home/ecommerce-next-steps.cy.js', // Requires Onboarding
] );
}

// Tests requires Woo, so exclude if not supported due to WP or PHP versions
if ( ! supportsWoo( config.env ) ) {
config.excludeSpecPattern = config.excludeSpecPattern.concat( [
'vendor/newfold-labs/wp-module-ecommerce/tests/cypress/integration/Site-Capabilities/**',
'vendor/newfold-labs/wp-module-ecommerce/tests/cypress/integration/Home/homePageWithWoo.cy.js',
'vendor/newfold-labs/wp-module-ecommerce/tests/cypress/integration/Home/ecommerce-next-steps.cy.js', // Skip this since Onboarding does not support this version
'vendor/newfold-labs/wp-module-onboarding/tests/cypress/integration/**', // Onboarding requires WP 6.5 or greater, as it uses the Wonder Theme which has the same requirement
'vendor/newfold-labs/wp-module-coming-soon/tests/cypress/integration/coming-soon-woo.cy.js', // woo is required and is not supported in older WP or PHP
'vendor/newfold-labs/wp-module-coming-soon/tests/cypress/integration/coming-soon-woo.cy.js',
] );
}

// Test requires Jetpack, so exclude if not supported due to WP or PHP versions
if ( ! supportsJetpack( config.env ) ) {
config.excludeSpecPattern = config.excludeSpecPattern.concat( [
'vendor/newfold-labs/wp-module-solutions/tests/cypress/integration/wp-plugins-installation-check.cy.js',
] );
}

Expand All @@ -88,3 +96,37 @@ module.exports = defineConfig({
retries: 1,
experimentalMemoryManagement: true,
})

// Check against plugin support at https://wordpress.org/plugins/woocommerce/
const supportsWoo = ( env ) => {
const semver = require( 'semver' );
if (
semver.satisfies( env.wpSemverVersion, '>=6.5.0' ) &&
semver.satisfies( env.phpSemverVersion, '>=7.4.0' )
) {
return true;
}
return false;
};
// Check against plugin support at https://wordpress.org/plugins/jetpack/
const supportsJetpack = ( env ) => {
const semver = require( 'semver' );
if (
semver.satisfies( env.wpSemverVersion, '>=6.6.0' ) &&
semver.satisfies( env.phpSemverVersion, '>=7.2.0' )
) {
return true;
}
return false;
};
// Check against theme support at https://github.com/newfold-labs/yith-wonder/blob/master/style.css
const supportsWonderTheme = ( env ) => {
const semver = require( 'semver' );
if (
semver.satisfies( env.wpSemverVersion, '>=6.5.0' ) &&
semver.satisfies( env.phpSemverVersion, '>=7.0.0' )
) {
return true;
}
return false;
};
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"translation-revision-date": "2023-08-24 18:27",
"generator": "WP-CLI\/2.11.0",
"source": "build\/2.12.3\/index.js",
"source": "build\/2.12.4\/index.js",
"domain": "messages",
"locale_data": {
"messages": {
Expand Down
Loading

0 comments on commit 5c21147

Please sign in to comment.