Skip to content

Commit 5d491b6

Browse files
committed
GH Actions/CS workflow: download XSD schema before using it
... as XMLLint does not handle remote URLs well.
1 parent 5c09bf7 commit 5d491b6

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

.github/workflows/cs.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,16 @@ jobs:
5656
sudo apt-get update
5757
sudo apt-get install --no-install-recommends -y libxml2-utils
5858
59+
- name: Download the XSD schema
60+
run: curl http://www.w3.org/2001/XMLSchema.xsd --output XMLSchema.xsd
61+
5962
# Show XML violations inline in the file diff.
6063
# @link https://github.com/marketplace/actions/xmllint-problem-matcher
6164
- uses: korelstar/xmllint-problem-matcher@v1
6265

6366
# Validate the XSD and XML files against schema.
6467
- name: Validate Docs XSD against schema
65-
run: xmllint --noout --schema http://www.w3.org/2001/XMLSchema.xsd DocsXsd/phpcsdocs.xsd
68+
run: xmllint --noout --schema XMLSchema.xsd DocsXsd/phpcsdocs.xsd
6669

6770
- name: Validate PHPCSDebug ruleset against schema
6871
run: xmllint --noout --schema vendor/squizlabs/php_codesniffer/phpcs.xsd PHPCSDebug/ruleset.xml

0 commit comments

Comments
 (0)