mirror of
https://github.com/hwchase17/langchain.git
synced 2025-05-24 00:18:24 +00:00
Cache linting venv on CI. (#9342)
Ensure that we cache the linting virtualenv as well as the pip cache for the `pip install -e langchain` step. This is a win of about 60-90s overall. Before:  After: 
This commit is contained in:
parent
c0d67420e5
commit
f2560188ec
13
.github/workflows/_lint.yml
vendored
13
.github/workflows/_lint.yml
vendored
@ -26,14 +26,27 @@ jobs:
|
|||||||
- "3.11"
|
- "3.11"
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
- uses: actions/cache@v3
|
||||||
|
id: cache-pip
|
||||||
|
name: Cache langchain editable pip install - ${{ matrix.python-version }}
|
||||||
|
env:
|
||||||
|
SEGMENT_DOWNLOAD_TIMEOUT_MIN: "15"
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
~/.cache/pip
|
||||||
|
key: pip-editable-langchain-deps-${{ runner.os }}-${{ runner.arch }}-py-${{ matrix.python-version }}
|
||||||
- name: Install poetry
|
- name: Install poetry
|
||||||
run: |
|
run: |
|
||||||
pipx install poetry==$POETRY_VERSION
|
pipx install poetry==$POETRY_VERSION
|
||||||
- name: Set up Python ${{ matrix.python-version }}
|
- name: Set up Python ${{ matrix.python-version }}
|
||||||
uses: actions/setup-python@v4
|
uses: actions/setup-python@v4
|
||||||
|
env:
|
||||||
|
SEGMENT_DOWNLOAD_TIMEOUT_MIN: "15"
|
||||||
with:
|
with:
|
||||||
python-version: ${{ matrix.python-version }}
|
python-version: ${{ matrix.python-version }}
|
||||||
cache: poetry
|
cache: poetry
|
||||||
|
cache-dependency-path: |
|
||||||
|
${{ inputs.working-directory == '' && '.' || inputs.working-directory }}/**/poetry.lock
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
poetry install
|
poetry install
|
||||||
|
Loading…
Reference in New Issue
Block a user