mirror of
https://github.com/hwchase17/langchain.git
synced 2025-08-20 01:49:51 +00:00
infra: fix pre-release integration test and add unit test (#14742)
This commit is contained in:
parent
480821da59
commit
c7b5dbe8ec
12
.github/workflows/_release.yml
vendored
12
.github/workflows/_release.yml
vendored
@ -113,6 +113,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Import published package
|
- name: Import published package
|
||||||
shell: bash
|
shell: bash
|
||||||
|
working-directory: ${{ inputs.working-directory }}
|
||||||
env:
|
env:
|
||||||
PKG_NAME: ${{ needs.build.outputs.pkg-name }}
|
PKG_NAME: ${{ needs.build.outputs.pkg-name }}
|
||||||
VERSION: ${{ needs.build.outputs.version }}
|
VERSION: ${{ needs.build.outputs.version }}
|
||||||
@ -125,7 +126,7 @@ jobs:
|
|||||||
# package because VERSION will not have been uploaded to regular PyPI yet.
|
# package because VERSION will not have been uploaded to regular PyPI yet.
|
||||||
#
|
#
|
||||||
run: |
|
run: |
|
||||||
pip install \
|
poetry run pip install \
|
||||||
--extra-index-url https://test.pypi.org/simple/ \
|
--extra-index-url https://test.pypi.org/simple/ \
|
||||||
"$PKG_NAME==$VERSION"
|
"$PKG_NAME==$VERSION"
|
||||||
|
|
||||||
@ -133,16 +134,15 @@ jobs:
|
|||||||
# since that's how Python imports packages with dashes in the name.
|
# since that's how Python imports packages with dashes in the name.
|
||||||
IMPORT_NAME="$(echo "$PKG_NAME" | sed s/-/_/g)"
|
IMPORT_NAME="$(echo "$PKG_NAME" | sed s/-/_/g)"
|
||||||
|
|
||||||
python -c "import $IMPORT_NAME; print(dir($IMPORT_NAME))"
|
poetry run python -c "import $IMPORT_NAME; print(dir($IMPORT_NAME))"
|
||||||
|
|
||||||
- name: Import test dependencies
|
- name: Import test dependencies
|
||||||
if: ${{ startsWith(inputs.working-directory, 'libs/partners/') }}
|
|
||||||
run: poetry install --with test,test_integration
|
run: poetry install --with test,test_integration
|
||||||
working-directory: ${{ inputs.working-directory }}
|
working-directory: ${{ inputs.working-directory }}
|
||||||
|
|
||||||
# Overwrite the local version of the package with the test PyPI version.
|
# Overwrite the local version of the package with the test PyPI version.
|
||||||
- name: Import published package (again)
|
- name: Import published package (again)
|
||||||
if: ${{ startsWith(inputs.working-directory, 'libs/partners/') }}
|
working-directory: ${{ inputs.working-directory }}
|
||||||
shell: bash
|
shell: bash
|
||||||
env:
|
env:
|
||||||
PKG_NAME: ${{ needs.build.outputs.pkg-name }}
|
PKG_NAME: ${{ needs.build.outputs.pkg-name }}
|
||||||
@ -152,6 +152,10 @@ jobs:
|
|||||||
--extra-index-url https://test.pypi.org/simple/ \
|
--extra-index-url https://test.pypi.org/simple/ \
|
||||||
"$PKG_NAME==$VERSION"
|
"$PKG_NAME==$VERSION"
|
||||||
|
|
||||||
|
- name: Run unit tests
|
||||||
|
run: make tests
|
||||||
|
working-directory: ${{ inputs.working-directory }}
|
||||||
|
|
||||||
- name: Run integration tests
|
- name: Run integration tests
|
||||||
if: ${{ startsWith(inputs.working-directory, 'libs/partners/') }}
|
if: ${{ startsWith(inputs.working-directory, 'libs/partners/') }}
|
||||||
env:
|
env:
|
||||||
|
Loading…
Reference in New Issue
Block a user