aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows/docx-validation.yaml
blob: 21d3415ca72ff2ade52b9faebcc575b05b577803 (plain)
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
52
53
54
55
56
57
58
59
60
name: docx-validation
on:
  push:
    paths:
      - test/docx/golden/*.docx
      - tools/validate-docx.sh
      - tools/validate-docx2.sh
      - .github/workflows/docx-validation.yaml
  pull_request:
    paths:
      - test/docx/golden/*.docx
      - tools/validate-docx.sh
      - tools/validate-docx2.sh
      - .github/workflows/docx-validation.yaml

permissions:
  contents: read

jobs:
  xmllint-docx:
    runs-on: ubuntu-latest
    steps:
    - name: Install xmllint
      run: |
          sudo apt-get update
          sudo apt-get install libxml2-utils -y

    - name: Checkout
      uses: actions/checkout@v6
      with:
          sparse-checkout: |
            test/docx/golden
            tools/
            Makefile

    - name: Validate golden .docx files against standard XML schema
      run: make validate-docx-golden-tests

  dotnet-docx:
    runs-on: ubuntu-latest

    steps:
    - name: ensure dotnet is present
      uses: actions/setup-dotnet@v5
        
    - name: Install json_reformat
      run: |
          sudo apt-get update
          sudo apt-get install yajl-tools -y

    - name: Checkout
      uses: actions/checkout@v6
      with:
          sparse-checkout: |
            test/docx/golden
            tools/
            Makefile

    - name: Validate golden docx files using dotnet
      run: make validate-docx-golden-tests2