# SPDX-License-Identifier: GPL-3.0-only # OpenScribe CI - runs on the self-hosted Forgejo Actions runner. name: ci on: push: branches: [main] pull_request: jobs: firmware: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 with: python-version: "3.11" - name: Install PlatformIO run: pip install platformio - name: Build firmware (both board profiles) working-directory: firmware run: | pio run -e esp32s3_dev pio run -e xiao_esp32s3 - name: Native unit tests (pure logic) working-directory: firmware run: pio test -e native - name: Static analysis (cppcheck) working-directory: firmware run: pio check -e esp32s3_dev --fail-on-defect high --skip-packages openapi: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 with: python-version: "3.11" - name: Validate OpenAPI spec run: | pip install openapi-spec-validator pyyaml python -c "from openapi_spec_validator import validate; import yaml; validate(yaml.safe_load(open('api/openapi.yaml'))); print('OpenAPI valid')" emulator: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 with: python-version: "3.11" - name: Build Wokwi firmware working-directory: firmware run: | pip install platformio pio run -e esp32s3_wokwi - name: Run in Wokwi (skipped without a token) working-directory: firmware env: WOKWI_CLI_TOKEN: ${{ secrets.WOKWI_CLI_TOKEN }} run: | if [ -z "$WOKWI_CLI_TOKEN" ]; then echo "No WOKWI_CLI_TOKEN secret set - skipping the emulator run (build still verified)." exit 0 fi curl -L https://wokwi.com/ci/install.sh | sh ~/.wokwi/wokwi-cli --timeout 15000 --expect-text "API at http" . server: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 with: python-version: "3.11" - name: Install server deps working-directory: server run: | pip install fastapi uvicorn pydantic pydantic-settings python-multipart ruff pytest - name: Lint working-directory: server run: ruff check app - name: Import check working-directory: server run: python -c "from app.main import app; print('server imports OK')"