Fix gh actions use of Python version (#13) #13
Workflow file for this run
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 get-platformio.py without uv | |
| on: | |
| workflow_dispatch: # Start a workflow | |
| push: | |
| jobs: | |
| test: | |
| strategy: | |
| matrix: | |
| os: [ubuntu-24.04, ubuntu-24.04-arm, windows-latest, macos-13, macos-latest] | |
| python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Ensure uv is not installed | |
| run: | | |
| pip uninstall -y uv || true | |
| if python -m uv --version 2>/dev/null; then exit 1; fi | |
| shell: bash | |
| - name: Remove Homebrew Python (macOS) | |
| if: runner.os == 'macOS' | |
| run: | | |
| # Liste alle installierten Python-Versionen von Homebrew auf | |
| brew list --formula | grep '^python@' | while read formula; do | |
| echo "Uninstalling $formula" | |
| brew uninstall --ignore-dependencies --force "$formula" | |
| done | |
| # Entferne auch unversioniertes python falls vorhanden | |
| if brew list python &>/dev/null; then | |
| brew uninstall --ignore-dependencies --force python | |
| fi | |
| # Entferne Symlinks in /usr/local/bin | |
| sudo rm -f /usr/local/bin/python* /usr/local/bin/pip* /usr/local/bin/2to3* | |
| shell: bash | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Run get-platformio.py | |
| run: | | |
| python get-platformio.py | |
| shell: bash | |
| - name: Install PlatformIO Core | |
| run: | | |
| if [ "$RUNNER_OS" == "Windows" ]; then | |
| ~/.platformio/penv/Scripts/pio.exe system info | |
| else | |
| ~/.platformio/penv/bin/pio system info | |
| fi | |
| shell: bash | |
| - name: Verify uv is installed in PlatformIO penv | |
| run: | | |
| if [ "$RUNNER_OS" == "Windows" ]; then | |
| ~/.platformio/penv/Scripts/uv.exe --help | |
| else | |
| ~/.platformio/penv/bin/uv --help | |
| fi | |
| shell: bash |