Skip to content

Commit

Permalink
GH Actions: add some additional XML validation checks
Browse files Browse the repository at this point in the history
... for dev tool files.
  • Loading branch information
jrfnl committed Mar 3, 2025
1 parent 721dc4e commit 96420c8
Showing 1 changed file with 31 additions and 1 deletion.
32 changes: 31 additions & 1 deletion .github/workflows/basics.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,43 @@ jobs:
# Bust the cache at least once a month - output format: YYYY-MM.
custom-cache-suffix: $(date -u "+%Y-%m")

# Validate the XML file.
# Validate the XML files.
- name: Validate ruleset XML against schema
uses: phpcsstandards/xmllint-validate@v1
with:
pattern: "./*/ruleset.xml"
xsd-file: "vendor/squizlabs/php_codesniffer/phpcs.xsd"

- name: Validate Project PHPCS ruleset against schema
uses: phpcsstandards/xmllint-validate@v1
with:
pattern: "phpcs.xml.dist"
xsd-file: "vendor/squizlabs/php_codesniffer/phpcs.xsd"

- name: "Validate PHPUnit < 10 config for use with PHPUnit 8"
uses: phpcsstandards/xmllint-validate@v1
with:
pattern: "phpunit.xml.dist"
xsd-file: "vendor/phpunit/phpunit/schema/8.5.xsd"

- name: "Validate PHPUnit < 10 config for use with PHPUnit 9"
uses: phpcsstandards/xmllint-validate@v1
with:
pattern: "phpunit.xml.dist"
xsd-file: "vendor/phpunit/phpunit/schema/9.2.xsd"

- name: "Validate PHPUnit 10+ config for use with PHPUnit 10"
uses: phpcsstandards/xmllint-validate@v1
with:
pattern: "phpunit10.xml.dist"
xsd-file: "vendor/phpunit/phpunit/schema/10.5.xsd"

- name: "Validate PHPUnit 10+ config for use with PHPUnit 11"
uses: phpcsstandards/xmllint-validate@v1
with:
pattern: "phpunit10.xml.dist"
xsd-file: "vendor/phpunit/phpunit/phpunit.xsd"

# Check the code-style consistency of the XML file.
# Note: this needs xmllint, but that will be installed via the phpcsstandards/xmllint-validate action runner.
- name: Check XML code style
Expand Down

0 comments on commit 96420c8

Please sign in to comment.