-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 <edwin@etorok.net>
- Loading branch information
1 parent
712d746
commit 2e9e23e
Showing
1 changed file
with
58 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |