-
-
Notifications
You must be signed in to change notification settings - Fork 3
51 lines (41 loc) · 1.52 KB
/
qa.yml
File metadata and controls
51 lines (41 loc) · 1.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
on:
push:
branches:
- latest
pull_request:
# Allow manually triggering the workflow.
workflow_dispatch:
name: qa
jobs:
xmllint:
name: 'Check install and XML'
runs-on: ubuntu-latest
env:
XMLLINT_INDENT: ' '
steps:
- name: Checkout code
uses: actions/checkout@v3.1.0
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
coverage: none
# Validate the composer.json file.
# @link https://getcomposer.org/doc/03-cli.md#validate
- name: Validate Composer installation
run: composer validate --no-check-all --strict
# Install dependencies to make sure the PHPCS XSD file is available.
- name: Install dependencies
run: composer install --prefer-dist --no-interaction --no-progress
- name: Setup xmllint
run: sudo apt-get install --no-install-recommends -y libxml2-utils
# Show violations inline in the file diff.
# @link https://github.com/marketplace/actions/xmllint-problem-matcher
- uses: korelstar/xmllint-problem-matcher@v1
# Validate the xml file.
# @link http://xmlsoft.org/xmllint.html
- name: Validate against schema
run: xmllint --noout --schema vendor/squizlabs/php_codesniffer/phpcs.xsd lib/phpDocumentor/ruleset.xml
# Check the code-style consistency of the xml file.
- name: Check code style
run: diff -B ./lib/phpDocumentor/ruleset.xml <(xmllint --format "./lib/phpDocumentor/ruleset.xml")