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:
|
with:
|
||||||
python-version: '3.12'
|
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
|
- name: Install dependencies
|
||||||
run: |
|
run: poetry install --no-interaction
|
||||||
pip install poetry
|
|
||||||
poetry install
|
|
||||||
|
|
||||||
- name: Setup DVC
|
- name: Setup DVC
|
||||||
run: |
|
run: |
|
||||||
@ -47,10 +58,21 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
python-version: '3.12'
|
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
|
- name: Install dependencies
|
||||||
run: |
|
run: poetry install --no-interaction
|
||||||
pip install poetry
|
|
||||||
poetry install
|
|
||||||
|
|
||||||
- name: Setup DVC
|
- name: Setup DVC
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user