Skip to content

Commit

Permalink
consolidate tests and build script
Browse files Browse the repository at this point in the history
  • Loading branch information
brentru committed Feb 19, 2025
1 parent cec28b1 commit 357a73c
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 52 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
required: true

jobs:
clang_and_doxy:
clang:
name: 🔎 Clang
runs-on: ubuntu-latest
steps:
Expand All @@ -30,10 +30,46 @@ jobs:
- name: clang
run: python3 ci/run-clang-format.py -r -e "ci/*" -e "bin/*" -e src/nanopb -e src/protos -e src/pb.h -e src/provisioning/tinyusb src/

test-offline-mode:
name: 🧪 Test Offline Mode
runs-on: ubuntu-latest
needs: clang
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 PIO Libraries for esp32dev target
run: pio pkg install --environment=esp32dev
- 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/test_offline.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
build-esp32sx:
name: 🏗️ESP32-Sx
name: 🏗️ ESP32-Sx
runs-on: ubuntu-latest
needs: clang_and_doxy
needs: [clang, test-offline-mode]
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -135,9 +171,9 @@ jobs:
wippersnapper.${{ matrix.arduino-platform }}.${{ env.WS_VERSION }}.bin
build-rp2040:
name: 🏗️RP2040, RP2350
name: 🏗️ RP2040, RP2350
runs-on: ubuntu-latest
needs: clang_and_doxy
needs: [clang, test-offline-mode]
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -220,7 +256,7 @@ jobs:


release-wippersnapper:
name: Release WipperSnapper
name: 🚀 Upload Release Files
runs-on: ubuntu-latest
needs: merge-job-build-files
steps:
Expand Down
46 changes: 0 additions & 46 deletions .github/workflows/run-offline-tests.yml

This file was deleted.

0 comments on commit 357a73c

Please sign in to comment.