name: test_doc_imports on: workflow_call: inputs: python-version: required: true type: string description: "Python version to use" env: UV_FROZEN: "true" jobs: build: runs-on: ubuntu-latest timeout-minutes: 20 name: "check doc imports #${{ inputs.python-version }}" steps: - uses: actions/checkout@v4 - name: Set up Python ${{ inputs.python-version }} + uv uses: "./.github/actions/uv_setup" with: python-version: ${{ inputs.python-version }} - name: Install dependencies shell: bash run: uv sync --group test - name: Install langchain editable run: | VIRTUAL_ENV=.venv uv pip install langchain-experimental langchain-community -e libs/core libs/langchain - name: Check doc imports shell: bash run: | uv run python docs/scripts/check_imports.py - name: Ensure the test did not create any additional files shell: bash run: | set -eu STATUS="$(git status)" echo "$STATUS" # grep will exit non-zero if the target message isn't found, # and `set -e` above will cause the step to fail. echo "$STATUS" | grep 'nothing to commit, working tree clean'