[wp-trac] [WordPress Trac] #53945: Local test workflow changes for installing Composer dependencies
WordPress Trac
noreply at wordpress.org
Fri Aug 27 15:41:45 UTC 2021
#53945: Local test workflow changes for installing Composer dependencies
------------------------------+---------------------
Reporter: hellofromTonya | Owner: (none)
Type: task (blessed) | Status: new
Priority: normal | Milestone: 5.9
Component: Build/Test Tools | Version: trunk
Severity: normal | Resolution:
Keywords: needs-patch | Focuses:
------------------------------+---------------------
Comment (by hellofromTonya):
During a [https://youtu.be/O_sLjiPs494?t=361 live mob working session]
with @netweb @johnbillion @desrosj @jrf and me, achieved consensus on how
to make the Composer install invisible to contributors when doing local
npm/Docker testing.
- In the `install.js` file, adding the following function and command:
{{{
/**
* Installs the Composer package dependencies within the Docker
environment.
*/
function install_composer_dependencies() {
execSync( `docker-compose run -T php composer update -W`, { stdio:
'inherit' } );
}
}}}
- What about if someone deletes the `vendor` folder and/or `composer.lock`
file? Add a cascade command with the `test:php` and `test:php-composer`
commands to first run `composer update`. Johnathan proposed to
`package.json` `"scripts"`:
{{{
"test:php-composer": "node ./tools/local-env/scripts/docker.js run -rm
composer update -W && node ./tools/local-env/scripts/docker.js run --rm
phpunit php ./vendor/bin/phpunit",
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/53945#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list