Skip to content

Commit 35aaedf

Browse files
committed
Merge branch 'stable' into develop
2 parents 1f393c9 + 2b3fd8b commit 35aaedf

File tree

1 file changed

+17
-7
lines changed

1 file changed

+17
-7
lines changed

README.md

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff 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).

0 commit comments

Comments
 (0)