|
19 | 19 | name: 'Basic CS and QA checks' |
20 | 20 | runs-on: ubuntu-latest |
21 | 21 |
|
22 | | - env: |
23 | | - XMLLINT_INDENT: ' ' |
24 | | - |
25 | 22 | steps: |
26 | 23 | - name: Checkout code |
27 | 24 | uses: actions/checkout@v4 |
|
82 | 79 | - name: Validate docs against schema |
83 | 80 | run: xmllint --noout --schema DocsXsd/phpcsdocs.xsd ./PHPCSDebug/Docs/*/*Standard.xml |
84 | 81 |
|
85 | | - # Check code-style consistency of the XSD and XML files. |
86 | | - - name: Check XSD code style |
87 | | - run: diff -B ./DocsXsd/phpcsdocs.xsd <(xmllint --format "./DocsXsd/phpcsdocs.xsd") |
88 | | - |
89 | | - - name: Check Ruleset XML code style |
90 | | - run: diff -B ./PHPCSDebug/ruleset.xml <(xmllint --format "./PHPCSDebug/ruleset.xml") |
91 | | - |
92 | 82 | # Check the code-style consistency of the PHP files. |
93 | 83 | - name: Check PHP code style |
94 | 84 | id: phpcs |
|
98 | 88 | if: ${{ always() && steps.phpcs.outcome == 'failure' }} |
99 | 89 | run: cs2pr ./phpcs-report.xml |
100 | 90 |
|
| 91 | + xml-cs: |
| 92 | + name: 'XML Code style' |
| 93 | + runs-on: ubuntu-latest |
| 94 | + |
| 95 | + env: |
| 96 | + XMLLINT_INDENT: ' ' |
| 97 | + |
| 98 | + steps: |
| 99 | + - name: Checkout code |
| 100 | + uses: actions/checkout@v4 |
| 101 | + |
| 102 | + # Updating the lists can fail intermittently, typically after Microsoft has released a new package. |
| 103 | + # This should not be blocking for this job, so ignore any errors from this step. |
| 104 | + # Ref: https://github.com/dotnet/core/issues/4167 |
| 105 | + - name: Update the available packages list |
| 106 | + continue-on-error: true |
| 107 | + run: sudo apt-get update |
| 108 | + |
| 109 | + - name: Install xmllint |
| 110 | + run: sudo apt-get install --no-install-recommends -y libxml2-utils |
| 111 | + |
| 112 | + # Show XML violations inline in the file diff. |
| 113 | + - name: Enable showing XML issues inline |
| 114 | + uses: korelstar/xmllint-problem-matcher@v1 |
| 115 | + |
| 116 | + # Check code-style consistency of the XSD and XML files. |
| 117 | + - name: Check XSD code style |
| 118 | + run: diff -B ./DocsXsd/phpcsdocs.xsd <(xmllint --format "./DocsXsd/phpcsdocs.xsd") |
| 119 | + |
| 120 | + - name: Check Ruleset XML code style |
| 121 | + run: diff -B ./PHPCSDebug/ruleset.xml <(xmllint --format "./PHPCSDebug/ruleset.xml") |
| 122 | + |
101 | 123 | phpstan: |
102 | 124 | uses: PHPCSStandards/.github/.github/workflows/reusable-phpstan.yml@main |
0 commit comments