Skip to content

Commit 61d0167

Browse files
authored
use pypi htmlcmp (#428)
1 parent 2de2d33 commit 61d0167

3 files changed

Lines changed: 109 additions & 14 deletions

File tree

.github/workflows/build_test.yml

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -192,12 +192,6 @@ jobs:
192192
with:
193193
token: ${{ secrets.PAT_ANDIWAND }}
194194
submodules: true
195-
- name: checkout
196-
uses: actions/checkout@v4
197-
with:
198-
repository: opendocument-app/compare-html
199-
ref: v1.0.0
200-
path: compare-html
201195

202196
- name: ubuntu install tidy
203197
if: runner.os == 'Linux'
@@ -211,7 +205,7 @@ jobs:
211205
with:
212206
python-version: 3.12
213207
- name: install python dependencies
214-
run: pip install -r compare-html/requirements.txt
208+
run: pip install htmlcmp==1.0.11
215209

216210
- name: download binaries
217211
uses: actions/download-artifact@v4
@@ -233,29 +227,31 @@ jobs:
233227
working-directory: build/test
234228
run: ./odr_test
235229

236-
- name: fix artifact permissions
230+
- name: windows fix artifact permissions
237231
if: runner.os == 'Windows'
238232
run: chmod +x build/test/Release/odr_test.exe
239-
- name: test
233+
- name: windows test
240234
if: runner.os == 'Windows'
241235
working-directory: build/test
242236
run: ./Release/odr_test.exe
243237

244238
- name: tidy public test outputs
245-
run: python3 -u compare-html/tidy_output.py build/test/output/odr-public/output
239+
run: html-tidy --html-tidy-config test/scripts/html-tidy-config build/test/output/odr-public/output
246240
- name: compare public test outputs
241+
shell: bash
247242
run: |
248-
python3 -u compare-html/compare_output.py \
243+
compare-html \
249244
--driver firefox \
250245
--max-workers 1 \
251246
test/data/reference-output/odr-public/output \
252247
build/test/output/odr-public/output
253248
254249
- name: tidy private test outputs
255-
run: python3 -u compare-html/tidy_output.py build/test/output/odr-private/output
250+
run: html-tidy --html-tidy-config test/scripts/html-tidy-config build/test/output/odr-private/output
256251
- name: compare private test outputs
252+
shell: bash
257253
run: |
258-
python3 -u compare-html/compare_output.py \
254+
compare-html \
259255
--driver firefox \
260256
--max-workers 1 \
261257
test/data/reference-output/odr-private/output \

test/scripts/compare_output_server.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ docker run -ti \
1818
-p 8000:8000 \
1919
--platform linux/amd64 \
2020
ghcr.io/opendocument-app/odr_core_test \
21-
python3 /repo/test/scripts/compare_output_server.py /repo/$REF /repo/$OBS --compare --driver $DRIVER --port 8000
21+
compare-html-server /repo/$REF /repo/$OBS --compare --driver $DRIVER --port 8000

test/scripts/html-tidy-config

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
accessibility-check: 0 (Tidy Classic)
2+
add-meta-charset: no
3+
add-xml-decl: no
4+
add-xml-space: no
5+
alt-text:
6+
anchor-as-name: yes
7+
ascii-chars: no
8+
assume-xml-procins: no
9+
bare: no
10+
break-before-br: no
11+
char-encoding: utf8
12+
clean: no
13+
coerce-endtags: no
14+
css-prefix: c
15+
custom-tags: inline
16+
decorate-inferred-ul: no
17+
doctype: html5
18+
drop-empty-elements: no
19+
drop-empty-paras: no
20+
drop-proprietary-attributes: no
21+
enclose-block-text: no
22+
enclose-text: no
23+
error-file:
24+
escape-cdata: no
25+
escape-scripts: yes
26+
fix-backslash: yes
27+
fix-bad-comments: yes
28+
fix-style-tags: yes
29+
fix-uri: false
30+
force-output: no
31+
gdoc: no
32+
gnu-emacs: no
33+
hide-comments: no
34+
indent: auto
35+
indent-attributes: no
36+
indent-cdata: no
37+
indent-spaces: 2
38+
indent-with-tabs: no
39+
input-encoding: utf8
40+
input-xml: no
41+
join-classes: no
42+
join-styles: yes
43+
keep-tabs: no
44+
keep-time: no
45+
literal-attributes: no
46+
logical-emphasis: no
47+
lower-literals: yes
48+
markup: yes
49+
merge-divs: auto
50+
merge-emphasis: yes
51+
merge-spans: auto
52+
mute:
53+
mute-id: no
54+
ncr: yes
55+
new-blocklevel-tags: x-p
56+
new-empty-tags:
57+
new-inline-tags: x-s
58+
new-pre-tags:
59+
newline: LF
60+
numeric-entities: no
61+
omit-optional-tags: no
62+
output-bom: auto
63+
output-encoding: utf8
64+
output-file:
65+
output-html: no
66+
output-xhtml: no
67+
output-xml: no
68+
preserve-entities: yes
69+
priority-attributes:
70+
punctuation-wrap: no
71+
quiet: yes
72+
quote-ampersand: yes
73+
quote-marks: no
74+
quote-nbsp: yes
75+
repeated-attributes: keep-last
76+
replace-color: no
77+
show-body-only: no
78+
show-errors: 6
79+
show-info: yes
80+
show-meta-change: no
81+
show-warnings: yes
82+
skip-nested: yes
83+
sort-attributes: none
84+
strict-tags-attributes: no
85+
tab-size: 4
86+
tidy-mark: no
87+
uppercase-attributes: no
88+
uppercase-tags: no
89+
vertical-space: no
90+
warn-proprietary-attributes: yes
91+
word-2000: no
92+
wrap: 80
93+
wrap-asp: yes
94+
wrap-attributes: no
95+
wrap-jste: yes
96+
wrap-php: yes
97+
wrap-script-literals: no
98+
wrap-sections: yes
99+
write-back: no

0 commit comments

Comments
 (0)