-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #266 from matomo-org/spice-psr
Adds test for PHPCS
- Loading branch information
Showing
53 changed files
with
306 additions
and
176 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: PHPCS check | ||
|
||
on: pull_request | ||
|
||
permissions: | ||
actions: read | ||
checks: read | ||
contents: read | ||
deployments: none | ||
issues: read | ||
packages: none | ||
pull-requests: read | ||
repository-projects: none | ||
security-events: none | ||
statuses: read | ||
|
||
jobs: | ||
phpcs: | ||
name: PHPCS | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
lfs: false | ||
persist-credentials: false | ||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: '7.4' | ||
tools: cs2pr | ||
- name: Install dependencies | ||
run: | ||
composer init --name=matomo/queuedtracking --quiet; | ||
composer --no-plugins config allow-plugins.dealerdirect/phpcodesniffer-composer-installer true -n; | ||
composer config repositories.matomo-coding-standards vcs https://github.com/matomo-org/matomo-coding-standards -n; | ||
composer require matomo-org/matomo-coding-standards:dev-master; | ||
composer install --dev --prefer-dist --no-progress --no-suggest | ||
- name: Check PHP code styles | ||
id: phpcs | ||
run: ./vendor/bin/phpcs --report-full --standard=phpcs.xml --report-checkstyle=./phpcs-report.xml | ||
- name: Show PHPCS results in PR | ||
if: ${{ always() && steps.phpcs.outcome == 'failure' }} | ||
run: cs2pr ./phpcs-report.xml --prepend-filename |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.