Skip to content

Commit 3d73120

Browse files
committed
Fix necessary early composer install
1 parent b5fd884 commit 3d73120

3 files changed

Lines changed: 15 additions & 2 deletions

File tree

.github/workflows/unit-test.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,18 @@ jobs:
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

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,18 @@ Clone the repository and set up the development environment:
1919
git clone https://github.com/WordPress/phpdoc-parser.git
2020
cd phpdoc-parser
2121
npm ci
22+
composer install
2223
npm run setup
2324
```
2425

2526
WordPress is available at <http://localhost:8888>.
2627

2728
## Tests
2829

30+
For a test-only setup:
31+
2932
```bash
33+
composer install
3034
npm run test:phpunit:setup
3135
npm test
3236
```

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
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",

0 commit comments

Comments
 (0)