ci: run native unit tests before firmware builds

Adds a "Unit tests" job running pio test -e native on ubuntu-latest.
The firmware build matrix waits for it, so a failing test also stops
release uploads.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
cjkas 2026-10-11 12:54:48 +02:00
parent 52c67b12f8
commit aa23b4624d

View file

@ -8,7 +8,28 @@ on:
types: [published] types: [published]
jobs: jobs:
test:
name: Unit tests
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install PlatformIO
run: pip install platformio
- name: Run native unit tests
run: pio test -e native
build: build:
# Don't build or publish firmware that fails its tests.
needs: test
permissions: write-all permissions: write-all
name: ${{ matrix.name }} name: ${{ matrix.name }}
runs-on: ubuntu-latest runs-on: ubuntu-latest