From 9372ab322361af30a50b352d50adc394a145e77a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edgar=20Ram=C3=ADrez=20Mondrag=C3=B3n?= <16805946+edgarrmondragon@users.noreply.github.com> Date: Thu, 19 Sep 2024 22:59:19 -0600 Subject: [PATCH] ci: Change how poetry deps are cached (#310) --- .github/workflows/test_tap.yml | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/.github/workflows/test_tap.yml b/.github/workflows/test_tap.yml index 6016a531..58227680 100644 --- a/.github/workflows/test_tap.yml +++ b/.github/workflows/test_tap.yml @@ -57,10 +57,6 @@ jobs: # file in the cache. See issue #119 key: api-cache-v4-${{ steps.get-date.outputs.date }} - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} - name: Install Poetry uses: snok/install-poetry@v1 with: @@ -68,16 +64,15 @@ jobs: version: 1.8.3 virtualenvs-create: true virtualenvs-in-project: true - - name: Load cached venv - id: cached-poetry-dependencies - uses: actions/cache@v4 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v5 with: - path: .venv - key: venv-4-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}-${{ matrix.python-version }} + python-version: ${{ matrix.python-version }} + cache: poetry - name: Install dependencies run: | + poetry env use ${{ matrix.python-version }} poetry install - if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' - name: Test with pytest id: test_pytest continue-on-error: true