-
Notifications
You must be signed in to change notification settings - Fork 5
38 lines (36 loc) · 1.27 KB
/
tests.yml
File metadata and controls
38 lines (36 loc) · 1.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
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"