diff --git a/README.md b/README.md index fab0ce4..f08fc7c 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,10 @@ Select the test versions to run PHPCompatibility. It supports any format accepte Paths to run compatibility check on. Default: `${{ github.workspace }}` +### extensions + +Specify the extensions of the files that will be checked. Example: `extensions: php,inc,lib`. By default, it uses the options set by PHPCompatibility and PHP_CodeSniffer. + ## Example Usage ``` @@ -31,9 +35,10 @@ uses: pantheon-systems/phpcompatibility-action@v1 with: test-versions: 7.4- paths: ${{ github.workspace }}/src + extensions: 'php,inc' ``` ## Development ### Autotag -This project uses our [autotag action](https://github.com/pantheon-systems/action-autotag). New releases are created on each merge to `main`. See the [autotag readme](https://github.com/pantheon-systems/autotag?tab=readme-ov-file#usage) for details. \ No newline at end of file +This project uses our [autotag action](https://github.com/pantheon-systems/action-autotag). New releases are created on each merge to `main`. See the [autotag readme](https://github.com/pantheon-systems/autotag?tab=readme-ov-file#usage) for details. diff --git a/action.yml b/action.yml index 59ac06b..a2ac385 100644 --- a/action.yml +++ b/action.yml @@ -16,6 +16,10 @@ inputs: description: 'Skip PHP Setup (useful if it was setup in another step)' required: false default: 'false' + extensions: + descriptions: 'Files only with this extension(s) will be tested' + required: false, + default: 'php' runs: using: 'composite' steps: @@ -29,3 +33,4 @@ runs: env: TEST_VERSIONS: ${{ inputs.test-versions }} PATHS: ${{ inputs.paths }} + EXTENSIONS: ${{ inputs.extensions }} diff --git a/entrypoint.sh b/entrypoint.sh index 6ba9114..49949a7 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -6,4 +6,4 @@ composer install export PATH=$PATH:$GITHUB_ACTION_PATH/vendor/bin -./vendor/bin/phpcs $PATHS --standard=PHPCompatibility --runtime-set testVersion $TEST_VERSIONS +./vendor/bin/phpcs --extensions=$EXTENSIONS $PATHS --standard=PHPCompatibility --runtime-set testVersion $TEST_VERSIONS