Skip to content

Commit 8a6744b

Browse files
authored
CI: Execute PDFAct tests (#48)
1 parent 0aff193 commit 8a6744b

3 files changed

Lines changed: 14 additions & 13 deletions

File tree

.github/workflows/ci.yml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,12 @@ jobs:
2121
fail-fast: true
2222
matrix:
2323
python: [3.12, 3.13]
24+
25+
services:
26+
pdfact:
27+
image: ghcr.io/data-house/pdfact:main
28+
ports:
29+
- 4567:4567
2430

2531
steps:
2632
- uses: actions/checkout@v6
@@ -35,6 +41,13 @@ jobs:
3541

3642
- name: Pull dependencies
3743
run: uv sync --all-extras --all-groups
38-
44+
45+
- name: Create .env file with fake API keys
46+
run: |
47+
echo "PARXY_LANDINGAI_API_KEY=$(openssl rand -hex 16)" >> .env
48+
echo "PARXY_LLAMAPARSE_API_KEY=$(openssl rand -hex 16)" >> .env
49+
3950
- name: Execute tests
51+
env:
52+
PARXY_PDFACT_BASE_URL: 'http://127.0.0.1:4567/'
4053
run: uv run pytest

tests/drivers/test_pdfact.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,6 @@
99
from parxy_core.models import PdfActConfig
1010

1111

12-
@pytest.mark.skipif(
13-
os.getenv('GITHUB_ACTIONS') == 'true',
14-
reason='External service required, skipping tests in GitHub Actions.',
15-
)
1612
class TestPdfActDriver:
1713
def __fixture_path(self, file: str) -> str:
1814
current_dir = os.path.dirname(os.path.abspath(__file__))

tests/test_factory.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -97,10 +97,6 @@ def test_pdfact_driver_instantiated(self):
9797
driver = DriverFactory.build().driver('pdfact')
9898
assert isinstance(driver, PdfActDriver)
9999

100-
@pytest.mark.skipif(
101-
os.getenv('GITHUB_ACTIONS') == 'true',
102-
reason='External service required, skipping tests in GitHub Actions.',
103-
)
104100
def test_llamaparse_driver_instantiated(self):
105101
DriverFactory.reset()
106102
driver = DriverFactory.build().driver('llamaparse')
@@ -116,10 +112,6 @@ def test_unstructured_local_driver_instantiated(self):
116112
driver = DriverFactory.build().driver('unstructured_local')
117113
assert isinstance(driver, UnstructuredLocalDriver)
118114

119-
@pytest.mark.skipif(
120-
os.getenv('GITHUB_ACTIONS') == 'true',
121-
reason='External service required, skipping tests in GitHub Actions.',
122-
)
123115
def test_landingai_driver_instantiated(self):
124116
DriverFactory.reset()
125117
driver = DriverFactory.build().driver('landingai')

0 commit comments

Comments
 (0)