Merge pull request #10 from kamil-tekiela/upgrade-doctrine/coding-sta… #15
This file contains hidden or 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
name: Test standard | |
on: | |
push: | |
pull_request: | |
types: [opened, synchronize, reopened] | |
branches: | |
- master | |
jobs: | |
test-ruleset: | |
name: Test rules on PHP ${{ matrix.php-version }} | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
php-version: ["8.1", "8.2"] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install xmllint | |
run: | | |
sudo apt update | |
sudo apt install --no-install-recommends -y libxml2-utils | |
sudo apt clean | |
- name: Use php ${{ matrix.php-version }} | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php-version }} | |
- name: Cache module | |
uses: actions/cache@v3 | |
with: | |
path: ~/.composer/cache/ | |
key: composer-cache | |
- name: Install dependencies | |
run: composer install | |
- name: Lint the ruleset | |
run: xmllint --noout --schema ./vendor/squizlabs/php_codesniffer/phpcs.xsd PhpMyAdmin/ruleset.xml | |
- name: Run php tests | |
run: ./vendor/bin/phpcs --standard=PhpMyAdmin -vv | grep -oF "Processing ruleset $(pwd)/PhpMyAdmin/ruleset.xml" |