Skip to content

Commit

Permalink
ci(workflows): use uv to install dependencies in main workflow run
Browse files Browse the repository at this point in the history
  • Loading branch information
arunanshub committed Aug 25, 2024
1 parent b77c222 commit 22691d0
Showing 1 changed file with 18 additions and 5 deletions.
23 changes: 18 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,15 +62,31 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

- name: Install uv installer 🌞
run: pipx install uv

- name: Get uv cache directory
id: uv-cache
run: |
echo "cache-dir=$(uv cache dir)\n" >> $GITHUB_OUTPUT
- name: Setup uv Cache
uses: actions/cache@v4
with:
key: uv-${{ runner.os }}-${{ matrix.python-version }}-pdm
path: ${{ steps.uv-cache.outputs.cache-dir }}

- name: Setup PDM 📦
uses: pdm-project/[email protected]
id: setup-pdm
with:
cache: true
python-version: ${{ matrix.python-version }}

- name: Install Python Dependencies 📦
run: pdm install
- name: Install Python Dependencies (using UV) 📦
run: |
pdm export -f requirements.txt
uv pip install -r requirements.txt --editable .
- name: Check Python Formatting 🖌️
run: pdm run ruff check .
Expand All @@ -89,9 +105,6 @@ jobs:
parallel: true
flag-name: run-${{ matrix.os }}-python-${{ matrix.python-version }}

- name: Install uv installer 🌞
run: pipx install uv

- name: Build wheels 🛞
uses: pypa/[email protected]
env:
Expand Down

0 comments on commit 22691d0

Please sign in to comment.