Compare commits

...

4 Commits

Author SHA1 Message Date
Erick Friis
948e3eaf53 Merge branch 'master' into erick/skip-release-check-cli 2023-11-14 15:16:26 -08:00
Erick Friis
8030dc90be another if 2023-11-08 08:13:28 -08:00
Erick Friis
366be2936a remove if 2023-11-08 08:10:35 -08:00
Erick Friis
e5b078d5f7 skip release check 2023-11-08 08:08:59 -08:00
2 changed files with 48 additions and 47 deletions

View File

@@ -14,7 +14,7 @@ env:
jobs:
build:
if: github.ref == 'refs/heads/master'
# if: github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
outputs:
@@ -70,58 +70,59 @@ jobs:
working-directory: ${{ inputs.working-directory }}
secrets: inherit
pre-release-checks:
needs:
- build
- test-pypi-publish
runs-on: ubuntu-latest
steps:
# We explicitly *don't* set up caching here. This ensures our tests are
# maximally sensitive to catching breakage.
#
# For example, here's a way that caching can cause a falsely-passing test:
# - Make the langchain package manifest no longer list a dependency package
# as a requirement. This means it won't be installed by `pip install`,
# and attempting to use it would cause a crash.
# - That dependency used to be required, so it may have been cached.
# When restoring the venv packages from cache, that dependency gets included.
# - 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
# used in the real world.
- uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}
# pre-release-checks:
# needs:
# - build
# - test-pypi-publish
# runs-on: ubuntu-latest
# steps:
# # We explicitly *don't* set up caching here. This ensures our tests are
# # maximally sensitive to catching breakage.
# #
# # For example, here's a way that caching can cause a falsely-passing test:
# # - Make the langchain package manifest no longer list a dependency package
# # as a requirement. This means it won't be installed by `pip install`,
# # and attempting to use it would cause a crash.
# # - That dependency used to be required, so it may have been cached.
# # When restoring the venv packages from cache, that dependency gets included.
# # - 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
# # used in the real world.
# - uses: actions/setup-python@v4
# with:
# python-version: ${{ env.PYTHON_VERSION }}
- name: Test published package
shell: bash
env:
PKG_NAME: ${{ needs.build.outputs.pkg-name }}
VERSION: ${{ needs.build.outputs.version }}
# Here we use:
# - The default regular PyPI index as the *primary* index, meaning
# that it takes priority (https://pypi.org/simple)
# - The test PyPI index as an extra index, so that any dependencies that
# are not found on test PyPI can be resolved and installed anyway.
# (https://test.pypi.org/simple). This will include the PKG_NAME==VERSION
# 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: |
pip install \
--extra-index-url https://test.pypi.org/simple/ \
"$PKG_NAME==$VERSION"
# - name: Test published package
# shell: bash
# env:
# PKG_NAME: ${{ needs.build.outputs.pkg-name }}
# VERSION: ${{ needs.build.outputs.version }}
# # Here we specify:
# # - The test PyPI index as the *primary* index, meaning that it takes priority.
# # - The regular PyPI index as an extra index, so that any dependencies that
# # are not found on test PyPI can be resolved and installed anyway.
# #
# # Without the former, we might install the wrong langchain release.
# # Without the latter, we might not be able to install langchain's dependencies.
# #
# # TODO: add more in-depth pre-publish tests after testing that importing works
# run: |
# pip install \
# --index-url https://test.pypi.org/simple/ \
# --extra-index-url https://pypi.org/simple/ \
# "$PKG_NAME==$VERSION"
# Replace all dashes in the package name with underscores,
# since that's how Python imports packages with dashes in the name.
IMPORT_NAME="$(echo "$PKG_NAME" | sed s/-/_/g)"
# # Replace all dashes in the package name with underscores,
# # since that's how Python imports packages with dashes in the name.
# IMPORT_NAME="$(echo "$PKG_NAME" | sed s/-/_/g)"
python -c "import $IMPORT_NAME; print(dir($IMPORT_NAME))"
# python -c "import $IMPORT_NAME; print(dir($IMPORT_NAME))"
publish:
needs:
- build
- test-pypi-publish
- pre-release-checks
# - pre-release-checks
runs-on: ubuntu-latest
permissions:
# This permission is used for trusted publishing:
@@ -162,7 +163,7 @@ jobs:
needs:
- build
- test-pypi-publish
- pre-release-checks
# - pre-release-checks
- publish
runs-on: ubuntu-latest
permissions:

View File

@@ -14,7 +14,7 @@ env:
jobs:
build:
if: github.ref == 'refs/heads/master'
# if: github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
outputs: