From 6ba9b6d5ff22425b97c093d1abef09451410f95f Mon Sep 17 00:00:00 2001 From: Robbi Bishop-Taylor Date: Mon, 14 Oct 2024 03:03:52 +0000 Subject: [PATCH] Update action --- .github/actions/setup-python-env/action.yml | 23 ++++++++++++++++----- .github/workflows/main.yml | 1 + 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/.github/actions/setup-python-env/action.yml b/.github/actions/setup-python-env/action.yml index 3ce30fd..c17ee1c 100644 --- a/.github/actions/setup-python-env/action.yml +++ b/.github/actions/setup-python-env/action.yml @@ -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 @@ -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 diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 63d7858..e48f7f3 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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