-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ci] Add basic regression test to PRs
- Loading branch information
Showing
2 changed files
with
75 additions
and
39 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,37 @@ | ||
name: Run Regression Tests | ||
|
||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
|
||
jobs: | ||
regressions: | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- name: Check out Repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Check out Test Docs Repository | ||
uses: actions/checkout@v3 | ||
with: | ||
repository: modm-ext/modm-data-test-docs | ||
path: ext/test/regression | ||
|
||
- name: Setup Python 3.12 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.12" | ||
|
||
- name: Install Python Dependencies | ||
run: | | ||
pip3 install . | ||
- name: Run Regression Tests | ||
working-directory: test | ||
run: | | ||
./convert_html.sh | ||
- name: Check Results | ||
run: | | ||
git diff-index --quiet --cached HEAD -- || (echo "Changes detected!" && exit 1) |
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 |
---|---|---|
@@ -1,58 +1,57 @@ | ||
python3 -m modm_data.pdf2html.stmicro --html --page 170 \ | ||
--document ext/stmicro/pdf/DS10693-v10.pdf --output test/data/html/DS10693-v10.html & | ||
|
||
python3 -m modm_data.pdf2html.stmicro --html --range 21:23 \ | ||
--document ext/stmicro/pdf/DS10329-v4.pdf --output test/data/html/DS10329-v4.html & | ||
python3 -m modm_data.pdf2html.stmicro --html \ | ||
--document ext/test/regression/stmicro/DS10329-v4.pdf --output test/data/html/stmicro/DS10329-v4.html & | ||
|
||
python3 -m modm_data.pdf2html.stmicro --html --range 88:90 \ | ||
--document ext/stmicro/pdf/DS12117-v7.pdf --output test/data/html/DS12117-v7.html & | ||
|
||
# Broken table header line, with partial boldness, double header line | ||
python3 -m modm_data.pdf2html.stmicro --html --range 638:641 --page 1143 --range 3055:3058 \ | ||
--document ext/stmicro/pdf/RM0399-v3.pdf --output test/data/html/RM0399-v3.html & | ||
|
||
# Broken table header line partial boldness | ||
python3 -m modm_data.pdf2html.stmicro --html --range 433:434 \ | ||
--document ext/stmicro/pdf/RM0456-v2.pdf --output test/data/html/RM0456-v2.html & | ||
|
||
# Broken table header line partial boldness >50% | ||
python3 -m modm_data.pdf2html.stmicro --html --page 893 \ | ||
--document ext/stmicro/pdf/RM0313-v6.pdf --output test/data/html/RM0313-v6.html & | ||
python3 -m modm_data.pdf2html.stmicro --html \ | ||
--document ext/test/regression/stmicro/DS10693-v10.pdf --output test/data/html/stmicro/DS10693-v10.html & | ||
|
||
# Double header line | ||
python3 -m modm_data.pdf2html.stmicro --html --range 51:52 \ | ||
--document ext/stmicro/pdf/DS11250-v4.pdf --output test/data/html/DS11250-v4.html & | ||
python3 -m modm_data.pdf2html.stmicro --html \ | ||
--document ext/test/regression/stmicro/DS11250-v4.pdf --output test/data/html/stmicro/DS11250-v4.html & | ||
|
||
python3 -m modm_data.pdf2html.stmicro --html \ | ||
--document ext/test/regression/stmicro/DS12117-v7.pdf --output test/data/html/stmicro/DS12117-v7.html & | ||
|
||
# Double header line | ||
python3 -m modm_data.pdf2html.stmicro --html --page 114 \ | ||
--document ext/stmicro/pdf/DS12556-v6.pdf --output test/data/html/DS12556-v6.html & | ||
python3 -m modm_data.pdf2html.stmicro --html \ | ||
--document ext/test/regression/stmicro/DS12556-v6.pdf --output test/data/html/stmicro/DS12556-v6.html & | ||
|
||
# Header cells with line but <30% bold | ||
python3 -m modm_data.pdf2html.stmicro --html --range 91:92 \ | ||
--document ext/stmicro/pdf/DS12930-v1.pdf --output test/data/html/DS12930-v1.html & | ||
python3 -m modm_data.pdf2html.stmicro --html \ | ||
--document ext/test/regression/stmicro/DS12930-v1.pdf --output test/data/html/stmicro/DS12930-v1.html & | ||
|
||
# Multiple thick lines and repeated headers without correct pagination | ||
python3 -m modm_data.pdf2html.stmicro --html --range 90:93 \ | ||
--document ext/stmicro/pdf/RM0090-v19.pdf --output test/data/html/RM0090-v19.html & | ||
|
||
# Header cells without line and >50% bold | ||
python3 -m modm_data.pdf2html.stmicro --html --range 1354:1355 \ | ||
--document ext/stmicro/pdf/RM0453-v2.pdf --output test/data/html/RM0453-v2.html & | ||
# Multiple thick lines and repeated headers without correct pagination | ||
python3 -m modm_data.pdf2html.stmicro --html \ | ||
--document ext/test/regression/stmicro/RM0090-v19.pdf --output test/data/html/stmicro/RM0090-v19.html & | ||
|
||
# Header cells without line and >50% bold | ||
python3 -m modm_data.pdf2html.stmicro --html --range 3005:3006 \ | ||
--document ext/stmicro/pdf/RM0456-v2.pdf --output test/data/html/RM0456-v2.html & | ||
# Broken table header line partial boldness >50% | ||
python3 -m modm_data.pdf2html.stmicro --html \ | ||
--document ext/test/regression/stmicro/RM0313-v6.pdf --output test/data/html/stmicro/RM0313-v6.html & | ||
|
||
# Table bottom line is out of template | ||
python3 -m modm_data.pdf2html.stmicro --html --range 773:773 \ | ||
--document ext/stmicro/pdf/RM0360-v4.pdf --output test/data/html/RM0360-v4.html & | ||
python3 -m modm_data.pdf2html.stmicro --html \ | ||
--document ext/test/regression/stmicro/RM0360-v4.pdf --output test/data/html/stmicro/RM0360-v4.html & | ||
|
||
# Heading 4 does not get recognized | ||
python3 -m modm_data.pdf2html.stmicro --html --range 180:180 \ | ||
--document ext/stmicro/pdf/RM0367-v8.pdf --output test/data/html/RM0367-v8.html & | ||
python3 -m modm_data.pdf2html.stmicro --html \ | ||
--document ext/test/regression/stmicro/RM0367-v8.pdf --output test/data/html/stmicro/RM0367-v8.html & | ||
|
||
# Broken table header line, with partial boldness, double header line | ||
python3 -m modm_data.pdf2html.stmicro --html \ | ||
--document ext/test/regression/stmicro/RM0399-v3.pdf --output test/data/html/stmicro/RM0399-v3.html & | ||
|
||
python3 -m modm_data.pdf2html.stmicro --html \ | ||
--document ext/test/regression/stmicro/RM0434-v9.pdf --output test/data/html/stmicro/RM0434-v9.html & | ||
|
||
python3 -m modm_data.pdf2html.stmicro --html --range 265:265 \ | ||
--document ext/stmicro/pdf/RM0434-v9.pdf --output test/data/html/RM0434-v9.html & | ||
# Header cells without line and >50% bold | ||
python3 -m modm_data.pdf2html.stmicro --html \ | ||
--document ext/test/regression/stmicro/RM0453-v2.pdf --output test/data/html/stmicro/RM0453-v2.html & | ||
|
||
# Broken table header line partial boldness | ||
# Header cells without line and >50% bold | ||
python3 -m modm_data.pdf2html.stmicro --html \ | ||
--document ext/test/regression/stmicro/RM0456-v2.pdf --output test/data/html/stmicro/RM0456-v2.html & | ||
|
||
wait | ||
|