Skip to content

Commit

Permalink
actions based on astral-sh/setup-uv action
Browse files Browse the repository at this point in the history
  • Loading branch information
tschm committed Jan 5, 2025
1 parent da2fa99 commit bcf0808
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
12 changes: 6 additions & 6 deletions actions/uv/build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,18 @@ runs:
using: "composite"

steps:
# Install uv
- name: Install uv
shell: bash
run: |
curl -LsSf https://astral.sh/uv/install.sh | sh
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
uses: astral-sh/setup-uv@887a942a15af3a7626099df99e897a18d9e5ab3a
with:
python-version: ${{ inputs.python-version }}

- name: Set up Python environment with uv
shell: bash
working-directory: ${{ inputs.working-directory }}
run: |
# Create venv with specific Python version
uv venv --python ${{ inputs.python-version }}
# Create venv
uv venv
# Add venv to PATH
echo ".venv/bin" >> $GITHUB_PATH
uv sync --all-extras --dev --frozen
Expand Down
4 changes: 3 additions & 1 deletion actions/uv/core/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,13 @@ runs:
# Install uv
- name: Install uv
uses: astral-sh/setup-uv@887a942a15af3a7626099df99e897a18d9e5ab3a
with:
python-version: ${{ inputs.python-version }}


- name: Set up Python and install dependencies
shell: bash
working-directory: ${{ inputs.working-directory }}
run: |
uv python install ${{ inputs.python-version }}
uv venv
uv pip install --no-cache-dir -r requirements.txt

0 comments on commit bcf0808

Please sign in to comment.