Add dependency caching to CI/CD pipeline
Added actions/cache@v3 to cache Poetry and pip dependencies across workflow runs. This significantly speeds up CI/CD by avoiding full reinstallation when poetry.lock hasn't changed. Cache strategy: - Cache key based on OS and poetry.lock hash - Caches ~/.cache/pypoetry and ~/.cache/pip - Falls back to OS-specific cache if exact match not found 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
bb8b08500b
commit
d61fad678c
@ -17,10 +17,21 @@ jobs:
|
||||
with:
|
||||
python-version: '3.12'
|
||||
|
||||
- name: Cache Poetry dependencies
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: |
|
||||
~/.cache/pypoetry
|
||||
~/.cache/pip
|
||||
key: ${{ runner.os }}-poetry-${{ hashFiles('**/poetry.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-poetry-
|
||||
|
||||
- name: Install Poetry
|
||||
run: pip install poetry
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
pip install poetry
|
||||
poetry install
|
||||
run: poetry install --no-interaction
|
||||
|
||||
- name: Setup DVC
|
||||
run: |
|
||||
@ -47,10 +58,21 @@ jobs:
|
||||
with:
|
||||
python-version: '3.12'
|
||||
|
||||
- name: Cache Poetry dependencies
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: |
|
||||
~/.cache/pypoetry
|
||||
~/.cache/pip
|
||||
key: ${{ runner.os }}-poetry-${{ hashFiles('**/poetry.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-poetry-
|
||||
|
||||
- name: Install Poetry
|
||||
run: pip install poetry
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
pip install poetry
|
||||
poetry install
|
||||
run: poetry install --no-interaction
|
||||
|
||||
- name: Setup DVC
|
||||
run: |
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user