aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdwin Török <[email protected]>2023-12-19 19:00:47 +0000
committerJohn MacFarlane <[email protected]>2023-12-19 15:00:23 -0800
commit2e9e23e9082cdeeb2c4b785d71af44c9ce96a922 (patch)
tree91d798f790fbacb9c4d6c58544fbd0bd43c31c69
parent712d746320d2f2bd1ee345dfa903b8d20d359cbe (diff)
ci(docx): add 2 CI rules to run the validation rules from the Makefile
Triggered only when the golden docx or the validator script changes. Signed-off-by: Edwin Török <[email protected]>
-rw-r--r--.github/workflows/docx-validation.yaml58
1 files changed, 58 insertions, 0 deletions
diff --git a/.github/workflows/docx-validation.yaml b/.github/workflows/docx-validation.yaml
new file mode 100644
index 000000000..7aee730d5
--- /dev/null
+++ b/.github/workflows/docx-validation.yaml
@@ -0,0 +1,58 @@
+name: docx-validation
+on:
+ push:
+ paths:
+ - test/docx/golden/*.docx
+ - tools/validate-docx.sh
+ - .github/workflows/docx-validation.yaml
+ pull_request:
+ paths:
+ - test/docx/golden/*.docx
+ - tools/validate-docx.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@v4
+ 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@v4
+
+ - name: Install json_reformat
+ run: |
+ sudo apt-get update
+ sudo apt-get install yajl-tools -y
+
+ - name: Checkout
+ uses: actions/checkout@v4
+ with:
+ sparse-checkout: |
+ test/docx/golden
+ tools/
+ Makefile
+
+ - name: Validate golden docx files using dotnet
+ run: make validate-docx-golden-tests2