diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 87297db..2d0c7ee 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,6 +21,12 @@ jobs: fail-fast: true matrix: python: [3.12, 3.13] + + services: + pdfact: + image: ghcr.io/data-house/pdfact:main + ports: + - 4567:4567 steps: - uses: actions/checkout@v6 @@ -35,6 +41,13 @@ jobs: - name: Pull dependencies run: uv sync --all-extras --all-groups - + + - name: Create .env file with fake API keys + run: | + echo "PARXY_LANDINGAI_API_KEY=$(openssl rand -hex 16)" >> .env + echo "PARXY_LLAMAPARSE_API_KEY=$(openssl rand -hex 16)" >> .env + - name: Execute tests + env: + PARXY_PDFACT_BASE_URL: 'http://127.0.0.1:4567/' run: uv run pytest diff --git a/tests/drivers/test_pdfact.py b/tests/drivers/test_pdfact.py index 95a8e83..083b66d 100644 --- a/tests/drivers/test_pdfact.py +++ b/tests/drivers/test_pdfact.py @@ -9,10 +9,6 @@ from parxy_core.models import PdfActConfig -@pytest.mark.skipif( - os.getenv('GITHUB_ACTIONS') == 'true', - reason='External service required, skipping tests in GitHub Actions.', -) class TestPdfActDriver: def __fixture_path(self, file: str) -> str: current_dir = os.path.dirname(os.path.abspath(__file__)) diff --git a/tests/test_factory.py b/tests/test_factory.py index a195f56..5a3b1b7 100644 --- a/tests/test_factory.py +++ b/tests/test_factory.py @@ -97,10 +97,6 @@ def test_pdfact_driver_instantiated(self): driver = DriverFactory.build().driver('pdfact') assert isinstance(driver, PdfActDriver) - @pytest.mark.skipif( - os.getenv('GITHUB_ACTIONS') == 'true', - reason='External service required, skipping tests in GitHub Actions.', - ) def test_llamaparse_driver_instantiated(self): DriverFactory.reset() driver = DriverFactory.build().driver('llamaparse') @@ -116,10 +112,6 @@ def test_unstructured_local_driver_instantiated(self): driver = DriverFactory.build().driver('unstructured_local') assert isinstance(driver, UnstructuredLocalDriver) - @pytest.mark.skipif( - os.getenv('GITHUB_ACTIONS') == 'true', - reason='External service required, skipping tests in GitHub Actions.', - ) def test_landingai_driver_instantiated(self): DriverFactory.reset() driver = DriverFactory.build().driver('landingai')