Skip to content

Commit dd55262

Browse files
committed
Add NPM and composer install options
1 parent 015c3d2 commit dd55262

1 file changed

Lines changed: 56 additions & 0 deletions

File tree

.github/workflows/tests.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,14 @@ on:
4141
required: false
4242
type: string
4343
default: '1'
44+
RUN_NPM_INSTALL:
45+
required: false
46+
type: string
47+
default: '0'
48+
RUN_COMPOSER_INSTALL:
49+
required: false
50+
type: string
51+
default: '0'
4452
MIN_PHP_VERSION:
4553
required: false
4654
type: string
@@ -230,6 +238,22 @@ jobs:
230238
run: .github/setup-database.sh $DB $MYISAM
231239
working-directory: ./phpBB3
232240

241+
- name: Install NPM dependencies
242+
if: ${{ inputs.RUN_NPM_INSTALL == '1' }}
243+
uses: actions/setup-node@v4
244+
with:
245+
node-version: 20
246+
247+
- name: Run npm ci
248+
if: ${{ inputs.RUN_NPM_INSTALL == '1' }}
249+
run: npm ci
250+
working-directory: ./phpBB3/phpBB/ext/${{ env.EXTNAME }}
251+
252+
- name: Install composer dependencies
253+
if: ${{ inputs.RUN_COMPOSER_INSTALL == '1' }}
254+
run: composer install
255+
working-directory: ./phpBB3/phpBB/ext/${{ env.EXTNAME }}
256+
233257
- name: Setup PHPUnit files
234258
env:
235259
DB: ${{steps.database-type.outputs.db}}
@@ -355,6 +379,22 @@ jobs:
355379
run: .github/setup-database.sh $DB $MYISAM
356380
working-directory: ./phpBB3
357381

382+
- name: Install NPM dependencies
383+
if: ${{ inputs.RUN_NPM_INSTALL == '1' }}
384+
uses: actions/setup-node@v4
385+
with:
386+
node-version: 20
387+
388+
- name: Run npm ci
389+
if: ${{ inputs.RUN_NPM_INSTALL == '1' }}
390+
run: npm ci
391+
working-directory: ./phpBB3/phpBB/ext/${{ env.EXTNAME }}
392+
393+
- name: Install composer dependencies
394+
if: ${{ inputs.RUN_COMPOSER_INSTALL == '1' }}
395+
run: composer install
396+
working-directory: ./phpBB3/phpBB/ext/${{ env.EXTNAME }}
397+
358398
- name: Setup PHPUnit files
359399
run: mkdir -p phpBB/ext/$EXTNAME/.github && cp .github/phpunit* $_
360400
working-directory: ./phpBB3
@@ -456,6 +496,22 @@ jobs:
456496
run: .github/setup-database.sh $DB $MYISAM
457497
working-directory: ./phpBB3
458498

499+
- name: Install NPM dependencies
500+
if: ${{ inputs.RUN_NPM_INSTALL == '1' }}
501+
uses: actions/setup-node@v4
502+
with:
503+
node-version: 20
504+
505+
- name: Run npm ci
506+
if: ${{ inputs.RUN_NPM_INSTALL == '1' }}
507+
run: npm ci
508+
working-directory: ./phpBB3/phpBB/ext/${{ env.EXTNAME }}
509+
510+
- name: Install composer dependencies
511+
if: ${{ inputs.RUN_COMPOSER_INSTALL == '1' }}
512+
run: composer install
513+
working-directory: ./phpBB3/phpBB/ext/${{ env.EXTNAME }}
514+
459515
- name: Setup PHPUnit files
460516
run: mkdir -p phpBB/ext/$EXTNAME/.github && cp .github/phpunit* $_
461517
working-directory: ./phpBB3

0 commit comments

Comments
 (0)