File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1919 - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
2020 with :
2121 persist-credentials : false
22- - name : Validate composer.json and composer.lock
22+ - name : Validate composer.json
2323 uses : " docker://composer"
2424 with :
2525 args : " composer validate --no-check-lock"
6161 persist-credentials : false
6262 - name : Check markdown
6363 uses : pipeline-components/remark-lint@master
64+
65+ lint-xml :
66+ name : Check XML files
67+ runs-on : ubuntu-latest
68+
69+ steps :
70+ - name : Checkout code
71+ uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
72+ with :
73+ persist-credentials : false
74+
75+ # Validate the XML ruleset files used in the tests.
76+ - name : Validate rulesets against schema
77+ uses : phpcsstandards/xmllint-validate@0fd9c4a9046055f621fca4bbdccb8eab1fd59fdc # v1.0.1
78+ with :
79+ pattern : " ./tests/*/ruleset.xml"
80+ xsd-file : " https://raw.githubusercontent.com/PHPCSStandards/PHP_CodeSniffer/refs/heads/4.x/phpcs.xsd"
81+
82+ # Validate dev tool related XML files.
83+ - name : Validate Project PHPCS ruleset against schema
84+ uses : phpcsstandards/xmllint-validate@0fd9c4a9046055f621fca4bbdccb8eab1fd59fdc # v1.0.1
85+ with :
86+ pattern : " phpcs.xml.dist"
87+ xsd-file : " https://raw.githubusercontent.com/PHPCSStandards/PHP_CodeSniffer/refs/heads/4.x/phpcs.xsd"
88+
89+ - name : " Validate PHPUnit config against schema"
90+ uses : phpcsstandards/xmllint-validate@0fd9c4a9046055f621fca4bbdccb8eab1fd59fdc # v1.0.1
91+ with :
92+ pattern : " phpunit.xml.dist"
93+ xsd-file : " https://raw.githubusercontent.com/sebastianbergmann/phpunit/refs/heads/main/schema/9.5.xsd"
Original file line number Diff line number Diff line change @@ -109,6 +109,7 @@ The non-PHP specific tools used by this build are:
109109- [jsonlint][] to verify that all JSON files use a consistent code style.
110110- [remark-lint][] to verify that all markdown files use a consistent code style.
111111- [yamllint][] to verify that all Yaml files use a consistent code style.
112+ - [xmllint][] to verify that XML files are well-formed and validated against the applicable XSD file.
112113
113114These tools are also run as [GitHub actions][].
114115All the checks can be run locally using [`act`][].
@@ -121,6 +122,7 @@ is written in. For details please consult the relevant tool's documentation.
121122[jsonlint]: https://www.npmjs.com/package/jsonlint
122123[remark-lint]: https://www.npmjs.com/package/remark-lint
123124[yamllint]: https://yamllint.readthedocs.io/en/stable/
125+ [xmllint]: https://gnome.pages.gitlab.gnome.org/libxml2/xmllint.html
124126[`act`]: https://github.com/nektos/act
125127
126128## Release process
You can’t perform that action at this time.
0 commit comments