Skip to content

Building AI agents, atomically

Refine GitHub Actions workflow for code quality by enhancing Poetry virtualenv caching and reinstating Python selection step. This update improves cache key specificity by incorporating the Python version, ensuring more reliable caching behavior.

KennyVaneetveldebe616d0eb882
diff --git a/.github/workflows/code-quality.yml b/.github/workflows/code-quality.yml
index f1a090a..22a13ad 100644
--- a/.github/workflows/code-quality.yml
+++ b/.github/workflows/code-quality.yml
@@ -17,7 +17,6 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: '3.12'
- cache: ""
- name: Install Poetry
run: |
@@ -28,18 +27,19 @@ jobs:
run: |
poetry config virtualenvs.create true
poetry config virtualenvs.in-project true
- - name: Select Python for Poetry
- run: |
- poetry env use $(which python)
- name: Cache Poetry virtualenv
uses: actions/cache@v4
id: cache
with:
path: ./.venv
- key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
+ key: venv-${{ runner.os }}-python-${{ runner.python-version }}-${{ hashFiles('**/poetry.lock') }}
restore-keys: |
- venv-${{ runner.os }}-
+ venv-${{ runner.os }}-python-${{ runner.python-version }}-
+
+ - name: Select Python for Poetry
+ run: |
+ poetry env use $(which python)
- name: Install Dependencies
run: |