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 @@ -205,16 +205,26 @@ jobs:
205205 steps :
206206 - uses : actions/checkout@v3
207207
208- - name : Install xmllint
209- run : |
210- sudo apt-get update
211- sudo apt-get install --no-install-recommends -y libxml2-utils
208+ - name : Validate docs against schema
209+ uses : phpcsstandards/xmllint-validate@v1
210+ with :
211+ pattern : " YourRuleset/Docs/**/*Standard.xml"
212+ xsd-url : " https://phpcsstandards.github.io/PHPCSDevTools/phpcsdocs.xsd"
213+ ` ` `
212214
213- # A Composer install is needed to have a local copy of the XSD available.
214- - run : composer install
215+ Or if you use this in a job which runs a ` composer install`, you can reference the file in the vendor directory.
216+ ` ` ` yaml
217+ jobs:
218+ validate-xml:
219+ runs-on: ubuntu-latest
220+ steps:
221+ - uses: actions/checkout@v3
215222
216223 - name: Validate docs against schema
217- run : xmllint --noout --schema vendor/phpcsstandards/phpcsdevtools/DocsXsd/phpcsdocs.xsd ./YourRuleset/Docs/**/*Standard.xml
224+ uses: phpcsstandards/xmllint-validate@v1
225+ with:
226+ pattern: "YourRuleset/Docs/**/*Standard.xml"
227+ xsd-file: "vendor/phpcsstandards/phpcsdevtools/DocsXsd/phpcsdocs.xsd"
218228` ` `
219229
220230: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