Skip to content

Commit

Permalink
ci(workflows): use uv to install dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
arunanshub committed Aug 25, 2024
1 parent b77c222 commit cc2868e
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ on:
permissions:
contents: read

defaults:
run:
shell: bash

jobs:
build:
strategy:
Expand Down Expand Up @@ -69,8 +73,22 @@ jobs:
cache: true
python-version: ${{ matrix.python-version }}

- name: Install Python Dependencies 📦
run: pdm install
- name: Setup uv 🌞
id: setup-uv
run: |
pipx install uv
printf "cache-dir=%s\n" $(uv cache dir) >> $GITHUB_OUTPUT
- name: Setup uv cache 🌞
uses: actions/cache@v4
with:
path: ${{ steps.setup-uv.outputs.cache-dir }}
key: uv-cache-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('**/pdm.lock') }}

- name: Install Python Dependencies (using uv) 📦
run: |
pdm export > requirements.txt
uv pip install -r requirements.txt --editable .
- name: Check Python Formatting 🖌️
run: pdm run ruff check .
Expand Down

0 comments on commit cc2868e

Please sign in to comment.