From e13ae8d5163440d6283c8983ac37f54d4d5c6c8c Mon Sep 17 00:00:00 2001 From: MountainGod2 Date: Fri, 1 Nov 2024 16:17:55 -0600 Subject: [PATCH] ci: Update ci.yml to add Python version to uv cache --- .github/workflows/ci.yml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0ef9a3c3..84816f59 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,12 +4,14 @@ on: push: branches: - main + tags-ignore: + - '*' pull_request: branches: - main env: - UV_CACHE_DIR: /tmp/.uv-cache + UV_CACHE_DIR: /tmp/.uv-cache-${{ matrix.python-version }} jobs: ci: @@ -37,10 +39,9 @@ jobs: uses: actions/cache@v4.1.2 with: path: ${{ env.UV_CACHE_DIR }} - key: "uv-${{ runner.os }}-${{ hashFiles('uv.lock') }}" + key: "uv-${{ matrix.python-version }}-${{ runner.os }}-${{ hashFiles('uv.lock') }}" restore-keys: | - uv-${{ runner.os }}-${{ hashFiles('uv.lock') }} - uv-${{ runner.os }} + uv-${{ matrix.python-version }}-${{ runner.os }} - name: Install Dependencies and Sync Project run: uv sync @@ -53,16 +54,17 @@ jobs: uv run pytest ./ - name: Scan with SonarCloud + if: matrix.python-version == '3.11' uses: SonarSource/sonarcloud-github-action@v3.1.0 env: SONAR_TOKEN: '${{ secrets.SONAR_TOKEN }}' - name: Upload Test Coverage to Codecov - if: success() + if: success() && matrix.python-version == '3.11' uses: codecov/codecov-action@v4.6.0 with: token: '${{ secrets.CODECOV_TOKEN }}' - file: ./coverage.xml + file: ./coverage-3.11.xml fail_ci_if_error: true - name: Build Documentation