diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000..1a83e6e --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,50 @@ +## Purpose + + +## Related Issue + +Closes # + +## Changes + + +## Architecture Impact + + +## Risk Boundaries + +- [ ] Telemetry acquisition (FROZEN 20 Hz pipeline) +- [ ] Sensor fusion / lean angle +- [ ] GNSS / speed processing +- [ ] Ride persistence / state machine +- [ ] Database / Drift Schema 7 +- [ ] Authentication / security rules +- [ ] Website (Next.js / Founder Portal / Ops Console) +- [ ] Backend / FastAPI API +- [ ] Routing / Waze relay +- [ ] None + +## Database Impact + +None + +## Validation Actually Executed + +```bash +# Example: +# flutter analyze +# flutter test +# flutter build apk --debug +# npm --prefix website run build +# npm --prefix server/waze_relay test +``` + +## Manual Testing + + +## Review Focus + + +## Documentation +- [ ] Documentation updated +- [ ] Documentation not required for this change diff --git a/.github/workflows/backend-ci.yml b/.github/workflows/backend-ci.yml new file mode 100644 index 0000000..ab7f077 --- /dev/null +++ b/.github/workflows/backend-ci.yml @@ -0,0 +1,45 @@ +name: MotorSignal Backend CI + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + workflow_dispatch: + +permissions: + contents: read + +concurrency: + group: backend-ci-${{ github.ref }} + cancel-in-progress: true + +jobs: + backend-api-tests: + name: Backend API tests + runs-on: ubuntu-latest + defaults: + run: + working-directory: backend/motorsignal_api + steps: + - name: Checkout + uses: actions/checkout@v6 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.12' + cache: 'pip' + cache-dependency-path: backend/motorsignal_api/requirements.lock + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.lock pytest httpx + + - name: Run Firebase Auth signature and claims tests + run: python tests/test_firebase_auth.py + + - name: Run isolated API and Operations unit tests + run: | + pytest tests/test_ops_support.py tests/test_ops_incidents.py tests/test_legacy_admin_retirement.py -v diff --git a/.github/workflows/waze-relay-ci.yml b/.github/workflows/waze-relay-ci.yml new file mode 100644 index 0000000..646df4e --- /dev/null +++ b/.github/workflows/waze-relay-ci.yml @@ -0,0 +1,39 @@ +name: MotorSignal Waze Relay CI + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + workflow_dispatch: + +permissions: + contents: read + +concurrency: + group: waze-relay-ci-${{ github.ref }} + cancel-in-progress: true + +jobs: + waze-relay-tests: + name: Waze relay tests + runs-on: ubuntu-latest + defaults: + run: + working-directory: server/waze_relay + steps: + - name: Checkout + uses: actions/checkout@v6 + + - name: Set up Node + uses: actions/setup-node@v6 + with: + node-version: '22' + cache: 'npm' + cache-dependency-path: server/waze_relay/package-lock.json + + - name: Install dependencies + run: npm ci + + - name: Run relay tests + run: npm test diff --git a/.github/workflows/website-ci.yml b/.github/workflows/website-ci.yml new file mode 100644 index 0000000..e814a04 --- /dev/null +++ b/.github/workflows/website-ci.yml @@ -0,0 +1,51 @@ +name: MotorSignal Website CI + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + workflow_dispatch: + +permissions: + contents: read + +concurrency: + group: website-ci-${{ github.ref }} + cancel-in-progress: true + +jobs: + website-build-and-tests: + name: Website build and regression tests + runs-on: ubuntu-latest + defaults: + run: + working-directory: website + steps: + - name: Checkout + uses: actions/checkout@v6 + + - name: Set up Node + uses: actions/setup-node@v6 + with: + node-version: '22' + cache: 'npm' + cache-dependency-path: website/package-lock.json + + - name: Install dependencies + run: npm ci + + - name: Build Next.js application + run: npm run build + + - name: Run Founder Portal tests + run: node tests/founder-portal.test.cjs + + - name: Run Operations Console tests + run: node tests/ops-experience.test.cjs + + - name: Run Responsive Layout tests + run: node tests/responsive-layout.test.cjs + + - name: Run Navigation and Auth tests + run: node tests/navigation-auth.cjs