Skip to content

Commit

Permalink
ci: enable uv caching for github actions workflows (#176)
Browse files Browse the repository at this point in the history
Co-authored-by: Timur Carstensen <[email protected]>
  • Loading branch information
timurcarstensen and timurcarstensen authored Jan 17, 2025
1 parent 7db5d9e commit bd2140e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
11 changes: 5 additions & 6 deletions .github/workflows/pre-commit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,12 @@ jobs:
- name: install the latest version uv
uses: astral-sh/setup-uv@v5
with:
python-version: '3.10'
version: latest
enable-cache: true
- name: create virtual environment
run: uv venv --python '3.10'
- name: install pre-commit
run: uv pip install pre-commit
prune-cache: false
cache-dependency-glob: "**/pyproject.toml"
- name: install pre-commit hooks
run: uv run pre-commit install
run: uv run --all-extras pre-commit install
- name: Run pre-commit hooks
run: uv run pre-commit run --all-files
run: uv run --all-extras pre-commit run --all-files
9 changes: 4 additions & 5 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,11 @@ jobs:
- name: install the latest version uv
uses: astral-sh/setup-uv@v5
with:
python-version: ${{ matrix.python-version }}
version: latest
enable-cache: true
- name: create venv
run: uv venv --python ${{ matrix.python-version }}
- name: install dependencies
run: uv pip install -e ".[dev]"
prune-cache: false
cache-dependency-glob: "**/pyproject.toml"
- name: run tests
run: uv run pytest -m "" # Run all markers
run: uv run --all-extras pytest -m "" # Run all markers

0 comments on commit bd2140e

Please sign in to comment.