-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: Update ci.yml to add Python version to uv cache
- Loading branch information
1 parent
7ab1265
commit e13ae8d
Showing
1 changed file
with
8 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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/[email protected] | ||
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/[email protected] | ||
env: | ||
SONAR_TOKEN: '${{ secrets.SONAR_TOKEN }}' | ||
|
||
- name: Upload Test Coverage to Codecov | ||
if: success() | ||
if: success() && matrix.python-version == '3.11' | ||
uses: codecov/[email protected] | ||
with: | ||
token: '${{ secrets.CODECOV_TOKEN }}' | ||
file: ./coverage.xml | ||
file: ./coverage-3.11.xml | ||
fail_ci_if_error: true | ||
|
||
- name: Build Documentation | ||
|