"""Shared fixtures for `tests/test_workflow/`.

Locates the `workflows/` directory at the repo root so individual tests
don't each re-derive the path.
"""

from __future__ import annotations

from pathlib import Path

import pytest


@pytest.fixture(scope="session")
def workflows_dir() -> Path:
    """Absolute path to the repo's `workflows/` directory."""
    # tests/test_workflow/conftest.py -> ../../workflows
    return Path(__file__).resolve().parents[2] / "workflows"


@pytest.fixture(scope="session")
def invalid_workflows_dir(workflows_dir: Path) -> Path:
    """Absolute path to `workflows/invalid/`."""
    return workflows_dir / "invalid"
