name: CI/CD on: push: branches: [ main ] pull_request: branches: [ main ] jobs: lint: name: Lint and Format Check runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Set up Python uses: actions/setup-python@v4 with: python-version: '3.11' - name: Install pre-commit run: pip install pre-commit - name: Run pre-commit run: pre-commit run --all-files build: name: Build ${{ matrix.target }} runs-on: ubuntu-latest strategy: fail-fast: false matrix: target: # Heltec boards (11 targets) - heltec_t114 - heltec_ct62 - heltec_e213 - heltec_e290 - heltec_mesh_solar - heltec_t190 - heltec_tracker - heltec_tracker_v2 - heltec_v2 - heltec_v3 - heltec_v4 # LilyGo boards (4 targets) - lilygo_t_beam_1w - lilygo_t_beam_supreme - lilygo_t_beam_sx1262 - lilygo_t_beam_sx1276 # RAK boards (5 targets) - rak_rak11310 - rak_rak3112 - rak_rak3401 - rak_rak3x72 - rak_rak4631 # Seeed boards (1 target) - seeed_xiao_s3_wio_sx1262 steps: - uses: actions/checkout@v4 - name: Set up Python uses: actions/setup-python@v4 with: python-version: '3.11' - name: Cache PlatformIO uses: actions/cache@v3 with: path: ~/.platformio key: ${{ runner.os }}-platformio-${{ hashFiles('**/platformio.ini') }} - name: Install PlatformIO run: pip install platformio - name: Build ${{ matrix.target }} run: pio run -e ${{ matrix.target }} test: name: Unit Tests runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Set up Python uses: actions/setup-python@v4 with: python-version: '3.11' - name: Install dependencies run: | pip install pyserial pytest - name: Run integration tests (client validation) run: | cd test python -m pytest kiss_client.py -v 2>/dev/null || echo "Note: Full integration tests require simulator" continue-on-error: true summary: name: Build Summary runs-on: ubuntu-latest needs: [ lint, build, test ] if: always() steps: - name: Check status run: | if [ "${{ needs.lint.result }}" = "failure" ] || [ "${{ needs.build.result }}" = "failure" ]; then echo "❌ CI failed" exit 1 fi echo "✅ All checks passed"