summaryrefslogtreecommitdiffstatshomepage
path: root/.github/workflows/hash.yml
blob: 94a6b24a298e1a8fc85ea2b2789b396c1b855ee6 (plain) (blame)
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
name: XML/JSON validation

on:
  push:
    paths:
    - '.github/**'
    - 'ctrlr/*'
    - 'hash/*'
    - 'plugins/**'
  pull_request:
    paths:
    - '.github/**'
    - 'ctrlr/*'
    - 'hash/*'
    - 'plugins/**'

jobs:
  validate:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@master
    - name: Install dependencies
      run: |
        sudo apt-get update
        sudo apt-get install -y libxml2-utils python3-jsonschema
    - name: Validate (controller configuration)
      run: for x in ctrlr/*.cfg ; do xmllint --noout "$x" ; done
    - name: Validate (HSI)
      run: for x in hash/*.hsi ; do xmllint --noout "$x" ; done
    - name: Validate (software list)
      run: for x in hash/*.xml ; do xmllint --noout --valid "$x" ; done
    - name: Validate (plugin properties)
      run: for x in plugins/*/plugin.json ; do jsonschema -i "$x" plugins/plugin.schema ; done