Skip to content

Commit

Permalink
Try with subaction
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielWTQ committed Aug 11, 2024
1 parent e36e4ed commit 2890050
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text eol=lf
3 changes: 3 additions & 0 deletions .github/PHPUnitSettings.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<?php

wfLoadExtension( 'examples' );
7 changes: 6 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,9 @@ jobs:
php: 7.4
mwbranch: REL1_39
extension: DummyExtension

dependencies:
- name: examples
checkout:
path: mediawiki/extensions/examples
repository: wikimedia/mediawiki-extensions-examples
extra_file: .github/PHPUnitSettings.php
9 changes: 9 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ inputs:
description: Use MySQL instead of SQLite
required: false
default: false
dependencies:
description: JSON encoded array of dependencies to pass to checkouts
required: false
default: '[]'
runs:
using: 'composite'
steps:
Expand Down Expand Up @@ -60,6 +64,11 @@ runs:
with:
path: mediawiki/${{ inputs.type }}s/${{ inputs.extension }}

- name: Install dependencies
uses: ./dependency-action.yml
with:
dependencies: ${{ inputs.dependencies }}

- name: Composer updates
working-directory: mediawiki
run: composer update
Expand Down
22 changes: 22 additions & 0 deletions dependency-action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: 'Mediawiki Extension PHPUnit Runner - dependency installer'
description: 'Installs multiple dependencies at once for the main action'
author: 'WikiTeq'
branding:
color: yellow
icon: book
inputs:
dependencies:
description: JSON encoded array of dependencies to pass to checkouts
required: false
default: '[]'
runs:
using: 'composite'
strategy:
matrix:
deps: ${{ fromJson( inputs.dependencies ) }}
steps:
- uses: actions/checkout@v4
with:
path: ${{ matrix.deps.path }}
repository: ${{ matrix.deps.repository }}
token: ${{ matrix.deps.token || '' }}

0 comments on commit 2890050

Please sign in to comment.