From 6c7f6af4b49fc5b4eee43afcf5efd450513c81b7 Mon Sep 17 00:00:00 2001 From: erinhmclark Date: Mon, 31 Mar 2025 11:11:56 +0100 Subject: [PATCH] Add cache action with key to OS, py version and lockfile hash, and install packages from source. --- .github/workflows/tests-core.yaml | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/.github/workflows/tests-core.yaml b/.github/workflows/tests-core.yaml index c839249..5cfbd2d 100644 --- a/.github/workflows/tests-core.yaml +++ b/.github/workflows/tests-core.yaml @@ -28,17 +28,26 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Install Poetry - run: pipx install poetry - - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - cache: 'poetry' - - name: Install dependencies + - name: Install latest Poetry + run: pipx install poetry + + - name: Cache Poetry and pip artifacts + uses: actions/cache@v4 + with: + path: | + ~/.cache/pypoetry + ~/.cache/pip + key: poetry-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }} + + - name: Install dependencies from source only run: poetry install --no-interaction --with dev + env: + PIP_NO_BINARY: ":all:" - name: Run Core Tests run: |