From 21cdd77125dce808ee9ac53ff481d9bb3b5d3578 Mon Sep 17 00:00:00 2001 From: Alex Dewar Date: Mon, 14 Oct 2024 18:25:40 +0100 Subject: [PATCH] CI: Fix `poetry` caching I followed @AdrianDAlessandro's suggestion in the issue and changed to installing `poetry` via `pipx` before the `setup-python` step. Fixes #103. --- .../.github/workflows/ci.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/{{ cookiecutter.project_slug }}/.github/workflows/ci.yml b/{{ cookiecutter.project_slug }}/.github/workflows/ci.yml index 4e3a1ef..45576cd 100644 --- a/{{ cookiecutter.project_slug }}/.github/workflows/ci.yml +++ b/{{ cookiecutter.project_slug }}/.github/workflows/ci.yml @@ -25,17 +25,17 @@ jobs: steps: - uses: actions/checkout@v4 +{%- if cookiecutter.packaging == "poetry" %} + - name: Install poetry + run: pipx install poetry +{%- endif %} + - uses: actions/setup-python@v5 with: python-version: ${{ "{{" }}matrix.python-version{{ "}}" }} cache: {% if cookiecutter.packaging == "poetry" %}poetry{% else %}pip{% endif %} {%- if cookiecutter.packaging == "poetry" %} - - name: Install Poetry - uses: abatilo/actions-poetry@v3.0.0 - with: - poetry-version: 1.8.3 - - name: Install dependencies run: poetry install