From 4ab12f8ce6ca830c2194cc6403e9f2135e6d89e6 Mon Sep 17 00:00:00 2001 From: Lyra Thorpe Date: Wed, 17 Jun 2026 17:33:37 +0100 Subject: [PATCH] Cache pip before install and fix cache key expansion (#12) Moves the actions/cache step ahead of the install step and uses the runner.os Actions expression in the cache key. Closes #8 Reviewed-on: https://code.emmathe.dev/lyrathorpe/legacy-email-proxy/pulls/12 Co-authored-by: Lyra Thorpe Co-committed-by: Lyra Thorpe --- .gitea/workflows/build-and-publish.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.gitea/workflows/build-and-publish.yaml b/.gitea/workflows/build-and-publish.yaml index 7df7ba8..88c3d6f 100644 --- a/.gitea/workflows/build-and-publish.yaml +++ b/.gitea/workflows/build-and-publish.yaml @@ -45,16 +45,16 @@ jobs: with: python-version: 3.12 - - name: Install test dependencies - run: python -m pip install --upgrade pip && pip install -r requirements-dev.txt - - name: Cache pip dependencies uses: actions/cache@v4 with: path: ~/.cache/pip - key: "$RUNNER_OS-pip-${{ hashFiles('requirements-dev.txt') }}" + key: "${{ runner.os }}-pip-${{ hashFiles('requirements-dev.txt') }}" restore-keys: | - $RUNNER_OS-pip- + ${{ runner.os }}-pip- + + - name: Install test dependencies + run: python -m pip install --upgrade pip && pip install -r requirements-dev.txt - name: Run unit tests run: python -m pytest -q