|
4 | 4 | workflow_dispatch: # Start a workflow
|
5 | 5 | push:
|
6 | 6 |
|
7 |
| - |
8 | 7 | jobs:
|
9 |
| - build: |
| 8 | + build: |
| 9 | + permissions: |
| 10 | + contents: write |
10 | 11 | strategy:
|
11 | 12 | fail-fast: false
|
12 | 13 | matrix:
|
13 |
| - os: [ubuntu-latest, windows-latest, macos-latest] |
14 |
| - python-version: ["3.10", "3.11", "3.12", "3.13"] |
| 14 | + os: [ubuntu-latest, ubuntu-24.04-arm, windows-latest, macos-13, macos-latest] |
| 15 | + python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] |
15 | 16 | runs-on: ${{ matrix.os }}
|
16 | 17 | steps:
|
17 | 18 | - uses: actions/checkout@v4
|
18 | 19 | - name: Set up Python ${{ matrix.python-version }}
|
19 | 20 | uses: actions/setup-python@v5
|
20 | 21 | with:
|
21 | 22 | python-version: ${{ matrix.python-version }}
|
22 |
| - - name: Check Python |
| 23 | + - name: Install uv |
| 24 | + uses: astral-sh/setup-uv@v4 |
| 25 | + with: |
| 26 | + enable-cache: true |
| 27 | + cache-dependency-path: | |
| 28 | + pyproject.toml |
| 29 | + uv.lock |
| 30 | + - name: Check Python and uv |
23 | 31 | run: |
|
24 |
| - python -V |
25 |
| - which python |
| 32 | + uv run python -V |
| 33 | + uv run python -c "import sys,shutil;print(sys.executable);print(shutil.which('python') or '')" |
| 34 | + uv --version |
26 | 35 | echo $PATH
|
27 |
| - - name: Install dependencies |
| 36 | + - name: Install dependencies with uv |
28 | 37 | run: |
|
29 |
| - python -m pip install --upgrade pip |
30 |
| - pip install -U tox pytest |
31 |
| - pip install -e . |
| 38 | + uv sync --dev |
32 | 39 | - name: Python Lint
|
33 | 40 | run: |
|
34 |
| - tox -e lint |
| 41 | + uv run make lint |
35 | 42 | - name: Integration Tests
|
36 | 43 | run: |
|
37 |
| - make test |
| 44 | + uv run make test |
38 | 45 | - name: Pack Installer Script
|
39 | 46 | run: |
|
40 |
| - make pack |
| 47 | + uv run make pack |
| 48 | + - name: Copy Installer Script to Parent Directory |
| 49 | + run: | |
| 50 | + cp dist/*.py . |
| 51 | + shell: bash |
41 | 52 | - name: Commit changed `get-platformio.py`
|
42 |
| - if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.12' |
| 53 | + if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.13' |
43 | 54 | uses: stefanzweifel/git-auto-commit-action@v5
|
44 | 55 | with:
|
45 | 56 | commit_message: "Github Action: Updated `get-platformio.py`"
|
46 | 57 | - name: Install PlatformIO Core
|
47 | 58 | run: |
|
48 |
| - python3 get-platformio.py |
| 59 | + uv run python get-platformio.py |
49 | 60 | if [ "$RUNNER_OS" == "Windows" ]; then
|
50 | 61 | ~/.platformio/penv/Scripts/pio.exe system info
|
51 | 62 | else
|
52 | 63 | ~/.platformio/penv/bin/pio system info
|
53 | 64 | fi
|
54 | 65 | shell: bash
|
| 66 | + - name: Verify uv is installed in PlatformIO penv |
| 67 | + run: | |
| 68 | + if [ "$RUNNER_OS" == "Windows" ]; then |
| 69 | + ~/.platformio/penv/Scripts/uv.exe --version |
| 70 | + else |
| 71 | + ~/.platformio/penv/bin/uv --version |
| 72 | + fi |
| 73 | + shell: bash |
0 commit comments