Skip to content

Commit 6fb1504

Browse files
authored
Merge pull request #52 from PHPCompatibility/feature/ghactions-change-xmllint-validation
GH Actions: use the xmllint-validate action runner
2 parents fd7aa90 + 5ccb09a commit 6fb1504

File tree

1 file changed

+8
-21
lines changed

1 file changed

+8
-21
lines changed

.github/workflows/ci.yml

Lines changed: 8 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -34,27 +34,14 @@ jobs:
3434
- name: Install dependencies
3535
run: composer install --no-dev --no-interaction --no-progress
3636

37-
# Updating the lists can fail intermittently, typically after Microsoft has released a new package.
38-
# This should not be blocking for this job, so ignore any errors from this step.
39-
# Ref: https://github.com/dotnet/core/issues/4167
40-
- name: Update the available packages list
41-
continue-on-error: true
42-
run: sudo apt-get update
43-
44-
- name: Install xmllint
45-
run: sudo apt-get install --no-install-recommends -y libxml2-utils
46-
47-
# Show violations inline in the file diff.
48-
# @link https://github.com/marketplace/actions/xmllint-problem-matcher
49-
- name: Enable showing XML issues inline
50-
uses: korelstar/xmllint-problem-matcher@v1
51-
52-
# Validate the xml file.
53-
# @link http://xmlsoft.org/xmllint.html
54-
- name: Validate against schema
55-
run: xmllint --noout --schema vendor/squizlabs/php_codesniffer/phpcs.xsd ./*/ruleset.xml
56-
57-
# Check the code-style consistency of the xml file.
37+
- name: Validate Ruleset XML file against schema
38+
uses: phpcsstandards/xmllint-validate@v1
39+
with:
40+
pattern: "./*/ruleset.xml"
41+
xsd-file: "vendor/squizlabs/php_codesniffer/phpcs.xsd"
42+
43+
# Check the code-style consistency of the xml files.
44+
# Note: this needs xmllint, but that will be installed via the phpcsstandards/xmllint-validate action runner.
5845
- name: Check code style
5946
run: |
6047
diff -B ./PHPCompatibilitySymfonyPolyfillPHP54/ruleset.xml <(xmllint --format "./PHPCompatibilitySymfonyPolyfillPHP54/ruleset.xml")

0 commit comments

Comments
 (0)