Skip to content

Commit aec7e74

Browse files
committed
1 parent cd1149a commit aec7e74

1 file changed

Lines changed: 18 additions & 4 deletions

File tree

.github/workflows/reusable-php-static-analysis.yml

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,23 +45,31 @@ jobs:
4545
show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}
4646
persist-credentials: false
4747

48+
- name: Set up Node.js
49+
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
50+
with:
51+
node-version-file: '.nvmrc'
52+
cache: npm
53+
4854
- name: Set up PHP
4955
uses: shivammathur/setup-php@20529878ed81ef8e78ddf08b480401e6101a850f # v2.35.3
5056
with:
5157
php-version: ${{ inputs.php-version }}
5258
coverage: none
5359
tools: cs2pr
5460

55-
- name: Log debug information
56-
run: |
57-
composer --version
58-
5961
# This date is used to ensure that the Composer cache is cleared at least once every week.
6062
# http://man7.org/linux/man-pages/man1/date.1.html
6163
- name: "Get last Monday's date"
6264
id: get-date
6365
run: echo "date=$(/bin/date -u --date='last Mon' "+%F")" >> "$GITHUB_OUTPUT"
6466

67+
- name: General debug information
68+
run: |
69+
npm --version
70+
node --version
71+
composer --version
72+
6573
# Since Composer dependencies are installed using `composer update` and no lock file is in version control,
6674
# passing a custom cache suffix ensures that the cache is flushed at least once per week.
6775
- name: Install Composer dependencies
@@ -72,6 +80,12 @@ jobs:
7280
- name: Make Composer packages available globally
7381
run: echo "${PWD}/vendor/bin" >> "$GITHUB_PATH"
7482

83+
- name: Install npm dependencies
84+
run: npm ci
85+
86+
- name: Build WordPress
87+
run: npm run build:dev
88+
7589
- name: Cache PHP Static Analysis scan cache
7690
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
7791
with:

0 commit comments

Comments
 (0)