Skip to content

Replace cmake based unit test action with platformio #73

Replace cmake based unit test action with platformio

Replace cmake based unit test action with platformio #73

Workflow file for this run

name: Check
on: [push, pull_request]
jobs:
unit-tests:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- ubuntu-latest
#- windows-latest
pio_env:
- native
#- Win32
# exclude:
# - os: ubuntu-latest
# pio_env: Win32
# - os: windows-latest
# pio_env: native
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install PlatformIO
run: |
python -m pip install --upgrade pip
pip install --upgrade platformio
- name: Run unit tests
run: platformio test -v -e ${{ matrix.pio_env }}
examples:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04]
example: [mock-injection, wiring-blink]
steps:
-
name: Checkout
uses: actions/checkout@v3
-
uses: actions/cache@v3
with:
path: |
~/.cache/pip
~/.platformio/.cache
key: ${{ runner.os }}-pio
-
uses: actions/setup-python@v4
with:
python-version: '3.9'
-
name: Install PlatformIO Core
run: pip install --upgrade platformio
-
name: Tests
run: pio test -d examples/wiring-blink/