manage cache, unlock uv sync
This commit is contained in:
parent
014f16ee6c
commit
5aee614e43
1 changed files with 13 additions and 1 deletions
14
.github/workflows/pytest.yaml
vendored
14
.github/workflows/pytest.yaml
vendored
|
|
@ -17,6 +17,8 @@ jobs:
|
||||||
- "3.12"
|
- "3.12"
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
env:
|
||||||
|
UV_PYTHON: ${{ matrix.python-version }}
|
||||||
steps:
|
steps:
|
||||||
- name: Check out the repository
|
- name: Check out the repository
|
||||||
uses: https://github.com/RouxAntoine/checkout@v4.1.8
|
uses: https://github.com/RouxAntoine/checkout@v4.1.8
|
||||||
|
|
@ -24,7 +26,17 @@ jobs:
|
||||||
show-progress: true
|
show-progress: true
|
||||||
- name: Install uv
|
- name: Install uv
|
||||||
uses: astral-sh/setup-uv@v7
|
uses: astral-sh/setup-uv@v7
|
||||||
|
- name: Restore uv cache
|
||||||
|
uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: /tmp/.uv-cache
|
||||||
|
key: uv-${{ runner.os }}-${{ hashFiles('uv.lock') }}
|
||||||
|
restore-keys: |
|
||||||
|
uv-${{ runner.os }}-${{ hashFiles('uv.lock') }}
|
||||||
|
uv-${{ runner.os }}
|
||||||
- name: Install corrlib
|
- name: Install corrlib
|
||||||
run: uv sync --locked --all-extras --dev
|
run: uv sync --all-extras --dev
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: uv run pytest tests
|
run: uv run pytest tests
|
||||||
|
- name: Minimize uv cache
|
||||||
|
run: uv cache prune --ci
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue