File tree Expand file tree Collapse file tree 1 file changed +17
-7
lines changed Expand file tree Collapse file tree 1 file changed +17
-7
lines changed Original file line number Diff line number Diff line change @@ -220,16 +220,26 @@ jobs:
220220 steps :
221221 - uses : actions/checkout@v3
222222
223- - name : Install xmllint
224- run : |
225- sudo apt-get update
226- sudo apt-get install --no-install-recommends -y libxml2-utils
223+ - name : Validate docs against schema
224+ uses : phpcsstandards/xmllint-validate@v1
225+ with :
226+ pattern : " YourRuleset/Docs/**/*Standard.xml"
227+ xsd-url : " https://phpcsstandards.github.io/PHPCSDevTools/phpcsdocs.xsd"
228+ ` ` `
227229
228- # A Composer install is needed to have a local copy of the XSD available.
229- - run : composer install
230+ Or if you use this in a job which runs a ` composer install`, you can reference the file in the vendor directory.
231+ ` ` ` yaml
232+ jobs:
233+ validate-xml:
234+ runs-on: ubuntu-latest
235+ steps:
236+ - uses: actions/checkout@v3
230237
231238 - name: Validate docs against schema
232- run : xmllint --noout --schema vendor/phpcsstandards/phpcsdevtools/DocsXsd/phpcsdocs.xsd ./YourRuleset/Docs/**/*Standard.xml
239+ uses: phpcsstandards/xmllint-validate@v1
240+ with:
241+ pattern: "YourRuleset/Docs/**/*Standard.xml"
242+ xsd-file: "vendor/phpcsstandards/phpcsdevtools/DocsXsd/phpcsdocs.xsd"
233243` ` `
234244
235245:point_right : You'll need to replace the `YourRuleset` within the command with the name of your ruleset (of course).
You can’t perform that action at this time.
0 commit comments