Update README.md #14
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Test UV Installation Detection | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| workflow_dispatch: | |
| jobs: | |
| test-standalone: | |
| runs-on: ubuntu-latest | |
| name: Test Standalone Installer | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install uv via standalone installer | |
| run: curl -LsSf https://astral.sh/uv/install.sh | sh | |
| - name: Add uv to PATH | |
| run: echo "$HOME/.local/bin" >> $GITHUB_PATH | |
| - name: Test uvhow detection | |
| run: | | |
| python3 -m venv test_env | |
| source test_env/bin/activate | |
| pip install -e . | |
| python3 -m uvhow | |
| # Verify it detects standalone installer | |
| python3 -m uvhow | grep -q "Standalone installer" || (echo "❌ Failed to detect standalone installer" && exit 1) | |
| echo "✅ Correctly detected standalone installer" | |
| test-pip-user: | |
| runs-on: ubuntu-latest | |
| name: Test pip --user Installation | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install uv via pip --user | |
| run: python3 -m pip install --user uv | |
| - name: Add user bin to PATH | |
| run: echo "$HOME/.local/bin" >> $GITHUB_PATH | |
| - name: Test uvhow detection | |
| run: | | |
| # Install uvhow in user space where uv is installed | |
| python3 -m pip install --user -e . | |
| python3 -m uvhow | |
| # Verify it detects pip user installation | |
| python3 -m uvhow | grep -q "pip (user)" || (echo "❌ Failed to detect pip user installation" && exit 1) | |
| echo "✅ Correctly detected pip user installation" | |
| test-pip-venv: | |
| runs-on: ubuntu-latest | |
| name: Test pip in Virtual Environment | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Create virtual environment and install uv | |
| run: | | |
| python3 -m venv .venv | |
| source .venv/bin/activate | |
| pip install uv | |
| echo "VIRTUAL_ENV=$VIRTUAL_ENV" >> $GITHUB_ENV | |
| echo ".venv/bin" >> $GITHUB_PATH | |
| - name: Test uvhow detection in venv | |
| run: | | |
| source .venv/bin/activate | |
| pip install -e . | |
| python3 -m uvhow | |
| # Verify it detects virtual environment installation | |
| python3 -m uvhow | grep -q "pip (virtual environment)" || (echo "❌ Failed to detect venv installation" && exit 1) | |
| echo "✅ Correctly detected venv installation" | |
| test-pipx: | |
| runs-on: ubuntu-latest | |
| name: Test pipx Installation | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install pipx and uv | |
| run: | | |
| python3 -m pip install --user pipx | |
| python3 -m pipx ensurepath | |
| echo "$HOME/.local/bin" >> $GITHUB_PATH | |
| pipx install uv | |
| - name: Test uvhow detection | |
| run: | | |
| python3 -m venv test_env | |
| source test_env/bin/activate | |
| pip install -e . | |
| python3 -m uvhow | |
| # Verify it detects pipx installation | |
| python3 -m uvhow | grep -q "pipx" || (echo "❌ Failed to detect pipx installation" && exit 1) | |
| echo "✅ Correctly detected pipx installation" | |
| test-homebrew: | |
| runs-on: macos-latest | |
| name: Test Homebrew Installation | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install uv via Homebrew | |
| run: brew install uv | |
| - name: Test uvhow detection | |
| run: | | |
| python3 -m venv test_env | |
| source test_env/bin/activate | |
| pip install -e . | |
| python3 -m uvhow | |
| # Verify it detects Homebrew installation | |
| python3 -m uvhow | grep -q "Homebrew" || (echo "❌ Failed to detect Homebrew installation" && exit 1) | |
| echo "✅ Correctly detected Homebrew installation" | |
| test-detection-accuracy: | |
| runs-on: ubuntu-latest | |
| name: Test Detection Logic | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install test dependencies and run tests | |
| run: | | |
| python3 -m venv test_env | |
| source test_env/bin/activate | |
| pip install -e . | |
| python3 test_detection.py |