From aa23b4624df1405b82bd49319ecf6a779d952341 Mon Sep 17 00:00:00 2001 From: cjkas Date: Sun, 11 Oct 2026 12:54:48 +0200 Subject: [PATCH] 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 --- .github/workflows/build.yaml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index dcd067d..bbc23e1 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -8,7 +8,28 @@ on: types: [published] 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: + # Don't build or publish firmware that fails its tests. + needs: test permissions: write-all name: ${{ matrix.name }} runs-on: ubuntu-latest