Skip to content

Commit

Permalink
towards complete tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tschm committed Jan 4, 2025
1 parent 20dadb6 commit 2f23740
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 9 deletions.
31 changes: 26 additions & 5 deletions actions/uv/deptry/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,39 @@ inputs:
description: 'Directory where the Python project is located'
required: false
default: '.'
python-version:
description: 'Python version to use'
required: false
default: '3.12'

runs:
using: "composite"
steps:
- name: Set up uv
uses: ${{ github.action_path }}/actions/uv/setup
with:
python-version: '3.12'
- name: Install uv
shell: bash
run: |
curl -LsSf https://astral.sh/uv/install.sh | sh
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
- 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 }}
# Add venv to PATH
echo ".venv/bin" >> $GITHUB_PATH
- name: Install project dependencies
shell: bash
working-directory: ${{ inputs.working-directory }}
run: |
uv python install ${{ inputs.python-version }}
uv sync --all-extras --dev --frozen
- name: Install and run deptry
shell: bash
working-directory: ${{ inputs.working-directory }}
run: |
cd ${{ inputs.working-directory }}
uv pip install --no-cache-dir deptry
uv run deptry ${{ inputs.source-folder }}
29 changes: 25 additions & 4 deletions actions/uv/marimo/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,35 @@ inputs:
description: 'Directory where the Python project is located'
required: false
default: '.'
python-version:
description: 'Python version to use'
required: false
default: '3.12'

runs:
using: composite
steps:
- uses: ././actions/uv/setup
with:
python-version: '3.12'
working-directory: ${{ inputs.working-directory }}
- name: Install uv
shell: bash
run: |
curl -LsSf https://astral.sh/uv/install.sh | sh
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
- 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 }}
# Add venv to PATH
echo ".venv/bin" >> $GITHUB_PATH
- name: Install project dependencies
shell: bash
working-directory: ${{ inputs.working-directory }}
run: |
uv python install ${{ inputs.python-version }}
uv sync --all-extras --dev --frozen
- name: Install marimo
shell: bash
Expand Down

0 comments on commit 2f23740

Please sign in to comment.