File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2222 - name : Checkout
2323 uses : actions/checkout@v4
2424
25- - name : Install
25+ - name : Set up PHP
26+ uses : shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # 2.37.2
27+ with :
28+ php-version : ${{ matrix.php-version }}
29+ coverage : none
30+
31+ - name : Install Node dependencies
2632 run : npm ci
2733
34+ - name : Install Composer dependencies
35+ run : composer install --no-interaction --no-security-blocking
36+
2837 - name : Setup test environment
2938 run : npm run test:phpunit:setup
3039
Original file line number Diff line number Diff line change @@ -19,14 +19,18 @@ Clone the repository and set up the development environment:
1919git clone https://github.com/WordPress/phpdoc-parser.git
2020cd phpdoc-parser
2121npm ci
22+ composer install
2223npm run setup
2324```
2425
2526WordPress is available at < http://localhost:8888 > .
2627
2728## Tests
2829
30+ For a test-only setup:
31+
2932``` bash
33+ composer install
3034npm run test:phpunit:setup
3135npm test
3236```
Original file line number Diff line number Diff line change 1212 "composer" : " wp-env --config .wp-env.test.json run --env-cwd='wp-content/plugins/phpdoc-parser' wordpress composer --no-interaction --no-security-blocking" ,
1313 "composer:setup" : " wp-env --config .wp-env.test.json run --env-cwd='wp-content/plugins/phpdoc-parser' wordpress composer install --no-interaction --no-security-blocking" ,
1414 "test:phpunit:setup" : " npm-run-all start:test composer:setup" ,
15- "test:phpunit" : " wp-env --config .wp-env.test.json run php --version && wp-env --config .wp-env.test.json run --env-cwd='wp-content/plugins/phpdoc-parser' wordpress vendor/phpunit/phpunit/phpunit -c phpunit.xml.dist"
15+ "test:phpunit" : " wp-env --config .wp-env.test.json run wordpress php -- --version && wp-env --config .wp-env.test.json run --env-cwd='wp-content/plugins/phpdoc-parser' wordpress vendor/phpunit/phpunit/phpunit -c phpunit.xml.dist"
1616 },
1717 "repository" : {
1818 "type" : " git" ,
You can’t perform that action at this time.
0 commit comments