From c8737e7e7e25e4f9ba432fc72f56f10ab1be7828 Mon Sep 17 00:00:00 2001 From: Benjamin Labrecque Date: Fri, 10 Jul 2026 11:22:41 +0200 Subject: [PATCH] chore: cache uv .venv in cicd --- .gitea/workflows/add-new-service.yml | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/.gitea/workflows/add-new-service.yml b/.gitea/workflows/add-new-service.yml index 6d2c949..f686796 100644 --- a/.gitea/workflows/add-new-service.yml +++ b/.gitea/workflows/add-new-service.yml @@ -31,22 +31,24 @@ jobs: SERVICE_NAME="${BRANCH#feature/add-service-}" echo "service_name_lower=$SERVICE_NAME" >> $GITHUB_OUTPUT - - name: Cache Python Virtual Environment - uses: actions/cache@v4 - with: - path: .venv - # Changes uv.lock will automatically invalidate the cache and rebuild - key: ${{ runner.os }}-uv-cli-venv-${{ hashFiles('cli/uv.lock') }} - restore-keys: | - ${{ runner.os }}-uv-cli-venv- + # TODO: look into venv caching (will do later in case we move from uv to pixi) + # - name: Cache Python Virtual Environment + # uses: actions/cache@v4 + # with: + # path: .venv + # # Changes uv.lock will automatically invalidate the cache and rebuild + # key: ${{ runner.os }}-uv-cli-venv-${{ hashFiles('cli/uv.lock') }} + # restore-keys: | + # ${{ runner.os }}-uv-cli-venv- + # # Only create the venv if the cache didn't restore an existing one + # if [ ! -d ".venv" ]; then + # echo "Building new .venv" + # uv venv .venv + # fi - name: Initialize Virtual Environment from cli/uv.lock run: | - # Only create the venv if the cache didn't restore an existing one - if [ ! -d ".venv" ]; then - echo "Building new .venv" - uv venv .venv - fi + uv venv .venv uv sync --directory cli - name: Install Ansible Galaxy Collections