Skip to content

Commit

Permalink
Update action
Browse files Browse the repository at this point in the history
  • Loading branch information
robbibt committed Oct 14, 2024
1 parent 7e6f969 commit 6ba9b6d
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 5 deletions.
23 changes: 18 additions & 5 deletions .github/actions/setup-python-env/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ inputs:
description: "Python version to use"
required: true
default: "3.10"
resolution:
description: "Resolution strategy"
required: true
default: "highest"
uv-version:
description: "uv version to use"
required: true
Expand All @@ -25,10 +29,19 @@ runs:
enable-cache: "true"
cache-suffix: ${{ inputs.python-version }}

# - name: Install Python dependencies
# # Install eo-tides and all required dependencies.
# # --all-extras will install all optional dependencies.
# # resolution method will install either "highest""
# # versions of dependencies, or "lowest-direct" versions
# run: uv sync --all-extras --resolution lowest-direct
# shell: bash

- name: Install Python dependencies
# Install eo-tides and all required dependencies.
# --all-extras will install all optional dependencies.
# resolution method will install either "highest""
# versions of dependencies, or "lowest-direct" versions
run: uv sync --all-extras --resolution lowest-direct
run: |
if [ "${{ inputs.resolution }}" == "lowest-direct" ]; then
uv sync --frozen --all-extras --resolution lowest-direct
else
uv sync --frozen --all-extras
fi
shell: bash
1 change: 1 addition & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ jobs:
uses: ./.github/actions/setup-python-env
with:
python-version: ${{ matrix.python-version }}
resolution: "highest"

- name: Run Python unit tests
run: uv run python -m pytest tests --cov --cov-config=pyproject.toml --cov-report=xml --verbose
Expand Down

0 comments on commit 6ba9b6d

Please sign in to comment.