bring in test runner, attempt to run! #1
This file contains 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
# SPDX-FileCopyrightText: Brent Rubell for Adafruit Industries, 2024-2025 | |
# | |
# SPDX-License-Identifier: MIT | |
name: WipperSnapper Tests for Offline Mode | |
on: | |
push: | |
branches: | |
- test-offline-release | |
secrets: | |
GH_REPO_TOKEN: | |
required: true | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repository code | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.13' | |
- name: Install Python dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r tests/requirements.txt | |
- name: Install Wokwi CI Server | |
uses: wokwi/wokwi-ci-server-action@v1 | |
- name: Install Wokwi CLI | |
run: curl -L https://wokwi.com/ci/install.sh | sh | |
- name: Install platformIO libraries | |
run: pio lib install | |
- name: Build PlatformIO Project | |
run: platformio run --environment esp32dev | |
- name: Move new build file to test folder | |
run: cp .pio/build/esp32dev/firmware.elf tests/bin/offline/firmware.elf | |
- name: Run Wokwi Tests | |
run: pytest tests/${{ matrix.test }}.py --junitxml=report.xml -v | |
env: | |
WOKWI_CLI_TOKEN: ${{ secrets.WOKWI_CLI_TOKEN }} | |
- name: Publish Wokwi Test Results | |
uses: EnricoMi/publish-unit-test-result-action@v2 | |
if: always() | |
with: | |
files: | | |
/home/runner/work/Adafruit_Wippersnapper_Arduino/Adafruit_Wippersnapper_Arduino/report.xml |