File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5656 - name : Install Composer dependencies
5757 run : composer install
5858
59- - name : Set PHP version for wp-env
59+ - name : Set PHP version and filter missing plugins for wp-env
6060 run : |
61- echo "{\"config\": {\"phpVersion\": \"${{ matrix.php }}\"}}" > .wp-env.override.json
61+ node -e "
62+ const fs = require('fs');
63+ const path = require('path');
64+ const config = JSON.parse(fs.readFileSync('.wp-env.json', 'utf8'));
65+ const override = { config: { phpVersion: '${{ matrix.php }}' }, env: {} };
66+ for (const [envName, envConfig] of Object.entries(config.env || {})) {
67+ if (envConfig.plugins) {
68+ const existing = envConfig.plugins.filter(p => {
69+ const resolved = path.resolve(p);
70+ return fs.existsSync(resolved);
71+ });
72+ override.env[envName] = { plugins: existing };
73+ }
74+ }
75+ fs.writeFileSync('.wp-env.override.json', JSON.stringify(override, null, 2));
76+ console.log('Override:', JSON.stringify(override, null, 2));
77+ "
6278
6379 - name : Start WordPress Test Environment
6480 run : npm run env:start:test
You can’t perform that action at this time.
0 commit comments