Skip to content

Commit

Permalink
Allow installation of mise from tox workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
ssbarnea committed Dec 17, 2024
1 parent 22b8f1f commit a1e2f20
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 8 deletions.
1 change: 1 addition & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
32 changes: 24 additions & 8 deletions .github/workflows/tox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -144,18 +144,34 @@ 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
# that depends on python3 blend being used and might not be already in path:
SCRIPTS_DIR=$(python3 -c 'import os,sysconfig;print(sysconfig.get_path("scripts",f"{os.name}_user"))')
if [[ ":$PATH:" != *":$SCRIPTS_DIR:"* ]]; then
export PATH=$SCRIPTS_DIR:$PATH
echo "$SCRIPTS_DIR" >> $GITHUB_PATH
echo "Added $SCRIPTS_DIR to PATH to avoid further issues."
fi
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 }}

Expand Down

0 comments on commit a1e2f20

Please sign in to comment.