mirror of
https://github.com/hwchase17/langchain.git
synced 2025-06-03 21:54:04 +00:00
infra: Pre-release integration tests for partner pkgs (#14687)
This commit is contained in:
parent
74211aa02e
commit
ba897fc04c
34
.github/workflows/_release.yml
vendored
34
.github/workflows/_release.yml
vendored
@ -101,11 +101,15 @@ jobs:
|
|||||||
# - Tests pass, because the dependency is present even though it wasn't specified.
|
# - Tests pass, because the dependency is present even though it wasn't specified.
|
||||||
# - The package is published, and it breaks on the missing dependency when
|
# - The package is published, and it breaks on the missing dependency when
|
||||||
# used in the real world.
|
# used in the real world.
|
||||||
- uses: actions/setup-python@v4
|
|
||||||
|
- name: Set up Python + Poetry ${{ env.POETRY_VERSION }}
|
||||||
|
uses: "./.github/actions/poetry_setup"
|
||||||
with:
|
with:
|
||||||
python-version: ${{ env.PYTHON_VERSION }}
|
python-version: ${{ env.PYTHON_VERSION }}
|
||||||
|
poetry-version: ${{ env.POETRY_VERSION }}
|
||||||
|
working-directory: ${{ inputs.working-directory }}
|
||||||
|
|
||||||
- name: Test published package
|
- name: Import published package
|
||||||
shell: bash
|
shell: bash
|
||||||
env:
|
env:
|
||||||
PKG_NAME: ${{ needs.build.outputs.pkg-name }}
|
PKG_NAME: ${{ needs.build.outputs.pkg-name }}
|
||||||
@ -118,7 +122,6 @@ jobs:
|
|||||||
# (https://test.pypi.org/simple). This will include the PKG_NAME==VERSION
|
# (https://test.pypi.org/simple). This will include the PKG_NAME==VERSION
|
||||||
# package because VERSION will not have been uploaded to regular PyPI yet.
|
# package because VERSION will not have been uploaded to regular PyPI yet.
|
||||||
#
|
#
|
||||||
# TODO: add more in-depth pre-publish tests after testing that importing works
|
|
||||||
run: |
|
run: |
|
||||||
pip install \
|
pip install \
|
||||||
--extra-index-url https://test.pypi.org/simple/ \
|
--extra-index-url https://test.pypi.org/simple/ \
|
||||||
@ -130,6 +133,31 @@ jobs:
|
|||||||
|
|
||||||
python -c "import $IMPORT_NAME; print(dir($IMPORT_NAME))"
|
python -c "import $IMPORT_NAME; print(dir($IMPORT_NAME))"
|
||||||
|
|
||||||
|
- name: Import test dependencies
|
||||||
|
if: ${{ startsWith(inputs.working-directory, 'libs/partners/') }}
|
||||||
|
run: poetry install --with test,test_integration
|
||||||
|
working-directory: ${{ inputs.working-directory }}
|
||||||
|
|
||||||
|
# Overwrite the local version of the package with the test PyPI version.
|
||||||
|
- name: Import published package (again)
|
||||||
|
if: ${{ startsWith(inputs.working-directory, 'libs/partners/') }}
|
||||||
|
shell: bash
|
||||||
|
env:
|
||||||
|
PKG_NAME: ${{ needs.build.outputs.pkg-name }}
|
||||||
|
VERSION: ${{ needs.build.outputs.version }}
|
||||||
|
run: |
|
||||||
|
poetry run pip install \
|
||||||
|
--extra-index-url https://test.pypi.org/simple/ \
|
||||||
|
"$PKG_NAME==$VERSION"
|
||||||
|
|
||||||
|
- name: Run integration tests
|
||||||
|
if: ${{ startsWith(inputs.working-directory, 'libs/partners/') }}
|
||||||
|
env:
|
||||||
|
GOOGLE_API_KEY: ${{ secrets.GOOGLE_API_KEY }}
|
||||||
|
run: make integration_tests
|
||||||
|
working-directory: ${{ inputs.working-directory }}
|
||||||
|
|
||||||
|
|
||||||
publish:
|
publish:
|
||||||
needs:
|
needs:
|
||||||
- build
|
- build
|
||||||
|
Loading…
Reference in New Issue
Block a user