chore(ci): add website relay and backend PR validation

This commit is contained in:
Developer 2026-09-18 19:07:51 -04:00
parent 2778c65972
commit d3f48b0a6f
4 changed files with 185 additions and 0 deletions

50
.github/pull_request_template.md vendored Normal file
View File

@ -0,0 +1,50 @@
## Purpose
<!-- What problem, bug, or feature does this PR address? -->
## Related Issue
<!-- Closes # or Fixes # -->
Closes #
## Changes
<!-- High-level bullet points of what code changed -->
## Architecture Impact
<!-- What subsystem or data flow is affected? -->
## Risk Boundaries
<!-- Check all subsystems touched by this PR -->
- [ ] 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
<!-- Schema version, migration logic, or None. Never change Schema 7 without explicit migration tests. -->
None
## Validation Actually Executed
<!-- IMPORTANT: List only exact commands actually executed in this session. NEVER state "all tests pass" unless specifically executed. -->
```bash
# Example:
# flutter analyze
# flutter test
# flutter build apk --debug
# npm --prefix website run build
# npm --prefix server/waze_relay test
```
## Manual Testing
<!-- What manual, physical device, or browser testing was performed, if any? -->
## Review Focus
<!-- Specific files, security boundaries, or edge cases reviewers should inspect closely. -->
## Documentation
- [ ] Documentation updated
- [ ] Documentation not required for this change

45
.github/workflows/backend-ci.yml vendored Normal file
View File

@ -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

39
.github/workflows/waze-relay-ci.yml vendored Normal file
View File

@ -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

51
.github/workflows/website-ci.yml vendored Normal file
View File

@ -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