Skip to content

Commit

Permalink
Merge 353565c into d7bba4e
Browse files Browse the repository at this point in the history
  • Loading branch information
circlecube authored Dec 6, 2024
2 parents d7bba4e + 353565c commit 6e1b4d1
Show file tree
Hide file tree
Showing 18 changed files with 550 additions and 449 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/cypress-matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,14 @@ jobs:
- '8.2'
- '8.3'
wpVersion:
- '6.4'
- '6.5'
- '6.6'
- '6.7'
exclude:
- phpVersion: '7.1'
wpVersion: '6.6'
- phpVersion: '7.1'
wpVersion: '6.7'

steps:

Expand Down Expand Up @@ -115,7 +117,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-mojo' || github.actor == 'dependabot[bot]' }}
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/cypress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,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 @wordpress/env@latest start
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-mojo' || github.actor == 'dependabot[bot]' }}
Expand Down
2 changes: 1 addition & 1 deletion .wp-env.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"core": "WordPress/WordPress#tags/6.6.2",
"core": "WordPress/WordPress#tags/6.7.1",
"config": {
"WP_DEBUG": true,
"WP_DEBUG_LOG": true,
Expand Down
10 changes: 5 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"newfold-labs/wp-php-standards": "^1.2.4",
"roave/security-advisories": "dev-latest",
"wp-cli/i18n-command": "^2.6.3",
"wp-phpunit/wp-phpunit": "^6.6.2"
"wp-phpunit/wp-phpunit": "^6.7.1"
},
"scripts": {
"fix": "vendor/bin/phpcbf --standard=phpcs.xml .",
Expand Down Expand Up @@ -71,18 +71,18 @@
"doctrine/inflector": "1.2.0 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.2.6",
"newfold-labs/wp-module-coming-soon": "^1.3.2",
"newfold-labs/wp-module-context": "^1.0.1",
"newfold-labs/wp-module-data": "^2.6.5",
"newfold-labs/wp-module-data": "^2.6.7",
"newfold-labs/wp-module-deactivation": "^1.2.3",
"newfold-labs/wp-module-features": "^1.4.2",
"newfold-labs/wp-module-loader": "^1.0.10",
"newfold-labs/wp-module-marketplace": "^2.4.0",
"newfold-labs/wp-module-notifications": "^1.6.2",
"newfold-labs/wp-module-notifications": "^1.6.6",
"newfold-labs/wp-module-performance": "^2.0.1",
"newfold-labs/wp-module-runtime": "^1.0.12",
"newfold-labs/wp-module-secure-passwords": "^1.1.1",
"newfold-labs/wp-module-sso": "^1.0.6",
"newfold-labs/wp-module-sso": "^1.0.7",
"wp-forge/wp-update-handler": "^1.0.2",
"wp-forge/wp-upgrade-handler": "^1.0"
}
Expand Down
171 changes: 95 additions & 76 deletions composer.lock

Large diffs are not rendered by default.

19 changes: 19 additions & 0 deletions cypress.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,13 @@ module.exports = defineConfig({
}
}

// 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-coming-soon/tests/cypress/integration/coming-soon-woo.cy.js',
] );
}

on('task', {
log(message) {
console.log(message)
Expand Down Expand Up @@ -84,3 +91,15 @@ 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;
};
Loading

0 comments on commit 6e1b4d1

Please sign in to comment.