24
24
# Don't run the cronjob in this workflow on forks.
25
25
if : github.event_name != 'schedule' || (github.event_name == 'schedule' && github.repository_owner == 'PHPCSStandards')
26
26
27
- env :
28
- XMLLINT_INDENT : ' '
29
-
30
27
steps :
31
28
- name : Checkout code
32
29
uses : actions/checkout@v4
59
56
- name : Validate XSD against schema
60
57
run : xmllint --noout --schema ./XMLSchema.xsd ./phpcs.xsd
61
58
59
+ # Validate the basic well-formedness of the Documentation XML files.
60
+ - name : Validate documentation XML
61
+ run : xmllint --noout ./src/Standards/*/Docs/*/*Standard.xml
62
+
63
+ xml-cs :
64
+ name : ' XML Code style'
65
+ runs-on : ubuntu-latest
66
+
67
+ # Don't run the cronjob in this workflow on forks.
68
+ if : github.event_name != 'schedule' || (github.event_name == 'schedule' && github.repository_owner == 'PHPCSStandards')
69
+
70
+ env :
71
+ XMLLINT_INDENT : ' '
72
+
73
+ steps :
74
+ - name : Checkout code
75
+ uses : actions/checkout@v4
76
+
77
+ # Updating the lists can fail intermittently, typically after Microsoft has released a new package.
78
+ # This should not be blocking for this job, so ignore any errors from this step.
79
+ # Ref: https://github.com/dotnet/core/issues/4167
80
+ - name : Update the available packages list
81
+ continue-on-error : true
82
+ run : sudo apt-get update
83
+
84
+ - name : Install xmllint
85
+ run : sudo apt-get install --no-install-recommends -y libxml2-utils
86
+
87
+ # Show XML violations inline in the file diff.
88
+ - name : Enable showing XML issues inline
89
+ uses : korelstar/xmllint-problem-matcher@v1
90
+
62
91
# Check the code-style consistency of the XML files.
63
92
- name : Check XML code style
64
93
run : |
@@ -71,10 +100,6 @@ jobs:
71
100
diff -B ./src/Standards/Squiz/ruleset.xml <(xmllint --format "./src/Standards/Squiz/ruleset.xml")
72
101
diff -B ./src/Standards/Zend/ruleset.xml <(xmllint --format "./src/Standards/Zend/ruleset.xml")
73
102
74
- # Validate the basic well-formedness of the Documentation XML files.
75
- - name : Validate documentation XML
76
- run : xmllint --noout ./src/Standards/*/Docs/*/*Standard.xml
77
-
78
103
yamllint :
79
104
name : ' Lint Yaml'
80
105
# Don't run the cronjob in this workflow on forks.
0 commit comments