Skip to content

Add BLE pairing screenshot tests and icon pos #911

Add BLE pairing screenshot tests and icon pos

Add BLE pairing screenshot tests and icon pos #911

Workflow file for this run

name: Continuous Integration
on:
push:
pull_request:
types: [opened, reopened, synchronize]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
cpplint:
name: CPP Lint
runs-on: ubuntu-slim
steps:
- uses: actions/checkout@v6
with:
token: ${{ github.token }}
show-progress: false
- name: Setup Python
uses: actions/setup-python@v6
with:
python-version: 3.x
- run: pip install cpplint
- run: cpplint --linelength 140 --filter=-legal/copyright,-runtime/int,-build/include_subdir,-readability/casting,-readability/todo,-build/include_order,-build/include_what_you_use,-whitespace/newline --recursive ./inc/ ./lib/ ./src/
pio-test:
name: PlatformIO Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
token: ${{ secrets.GH_TOKEN || github.token }}
persist-credentials: true
show-progress: false
- name: Setup Git Credentials
run: |
git config --global credential.helper store
echo "https://oauth2:${{ secrets.GH_TOKEN || github.token }}@github.com" > ~/.git-credentials
- name: Setup Python
uses: actions/setup-python@v6
with:
python-version: "3.13"
- name: Cache PlatformIO
uses: actions/cache@v5
with:
path: ~/.platformio
key: pio-${{ hashFiles('platformio.ini') }}
restore-keys: pio-
- name: Install PlatformIO
run: |
python -m pip install --upgrade pip
pip install -U platformio
- name: Run Unit Tests
run: platformio test -e native-test
screenshot-tests:
name: Screenshot Regression Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
token: ${{ github.token }}
show-progress: false
- name: Install Dependencies
run: sudo apt-get update && sudo apt-get install -y cmake g++
- name: Build & Run Screenshot Tests
run: ./test/test_screenshots/build_and_run.sh
- name: Upload Screenshots on Failure
if: failure()
uses: actions/upload-artifact@v7
with:
name: screenshot-regression-output
path: test/test_screenshots/output/
pio-build:
name: PlatformIO Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
token: ${{ secrets.GH_TOKEN || github.token }}
persist-credentials: true
show-progress: false
- name: Setup Git Credentials
run: |
git config --global credential.helper store
echo "https://oauth2:${{ secrets.GH_TOKEN || github.token }}@github.com" > ~/.git-credentials
- name: Setup Python
uses: actions/setup-python@v6
with:
python-version: "3.13"
- name: Cache PlatformIO
uses: actions/cache@v5
with:
path: ~/.platformio
key: pio-${{ hashFiles('platformio.ini') }}
restore-keys: pio-
- name: Install PlatformIO
run: |
python -m pip install --upgrade pip
pip install -U platformio
- name: Build ESP32S3
run: platformio run -e OpenPPG-CESP32S3-CAN-SP140
- name: Install esptool
run: pip install esptool
- name: Merge Binaries
run: |
esptool.py --chip esp32s3 merge_bin \
-o .pio/build/OpenPPG-CESP32S3-CAN-SP140/full-controller-firmware.bin \
--flash_mode dio \
--flash_freq 80m \
--flash_size 8MB \
0x0 .pio/build/OpenPPG-CESP32S3-CAN-SP140/bootloader.bin \
0x8000 .pio/build/OpenPPG-CESP32S3-CAN-SP140/partitions.bin \
0xe000 /home/runner/.platformio/packages/framework-arduinoespressif32/tools/partitions/boot_app0.bin \
0x10000 .pio/build/OpenPPG-CESP32S3-CAN-SP140/firmware.bin
- name: Stage Firmware Artifacts
run: |
mkdir -p release-artifacts
cp .pio/build/OpenPPG-CESP32S3-CAN-SP140/firmware.bin release-artifacts/openppg-sp140-ota-firmware.bin
cp .pio/build/OpenPPG-CESP32S3-CAN-SP140/full-controller-firmware.bin release-artifacts/openppg-sp140-full-flash.bin
- name: Archive ESP32S3 Firmware
uses: actions/upload-artifact@v7
with:
name: OpenPPG-CESP32S3-CAN-SP140-firmware
path: release-artifacts/