From ac19650536d416722788ed8c1c4eb2c2f2d532e1 Mon Sep 17 00:00:00 2001 From: Sorin Sbarnea Date: Tue, 17 Dec 2024 10:39:25 +0000 Subject: [PATCH] Allow installation of mise from tox workflow --- .github/workflows/test.yml | 1 + .github/workflows/tox.yml | 25 +++++++++++++++++-------- 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0a5a494..d72a055 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -21,6 +21,7 @@ jobs: other_names: | docs lint + py-mise:tox -e py:mise=true node-version-file: .tool-versions check: # This job does nothing and is only used for the branch protection diff --git a/.github/workflows/tox.yml b/.github/workflows/tox.yml index 1af5444..eaac2c9 100644 --- a/.github/workflows/tox.yml +++ b/.github/workflows/tox.yml @@ -144,18 +144,27 @@ jobs: run: | echo "$HOME/.local/bin" >> "$GITHUB_PATH" + - name: Install mise + if: ${{ matrix.mise == 'true' }} + run: | + set -exuo pipefail + type mise || { + curl https://mise.run | sh + echo "$HOME/.local/share/mise/bin" >> $GITHUB_PATH + echo "$HOME/.local/share/mise/shims" >> $GITHUB_PATH + } + mise install + - name: Install python build tools run: | set -exuo pipefail - echo $PATH - python3 -m pip install --upgrade pip uv - # uv tool update-shell - uv tool install "tox>=4.23.2" --with "tox-uv>=1.16.0" + echo PATH=$PATH + python3 -m pip install --upgrade --user --break-system-packages pip uv tox>=4.23.2 tox-uv>=1.16.0 + which -a uv pip tox + echo "uv tool update-shell" tox --version - which -a uv - - - name: Log installed dists - run: python3 -m uv pip freeze + echo "Log installed dists" + python3 -m uv pip freeze - run: ${{ matrix.command }}