feat: harden Postbox lifecycle and Android notifications #15
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| pull_request: | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ci-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| validate: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 20 | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v7 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v7 | |
| with: | |
| node-version: 22 | |
| cache: npm | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Check protocol version discipline | |
| run: node scripts/check-protocol-discipline.mjs "origin/${{ github.base_ref }}" | |
| - name: Check generated Android protocol contract | |
| run: npm run check:android-protocol-contract | |
| - name: Run tests | |
| run: npm test | |
| - name: Check web application | |
| run: npm run check -w @pi-postbox/web | |
| - name: Build packages | |
| run: npm run build | |
| - name: Run packaged smoke test | |
| run: npm run smoke | |
| android: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v7 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v7 | |
| with: | |
| node-version: 22 | |
| cache: npm | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Check generated Android protocol contract | |
| run: npm run check:android-protocol-contract | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v5 | |
| with: | |
| distribution: temurin | |
| java-version: "17" | |
| cache: gradle | |
| - name: Set up Android SDK | |
| uses: android-actions/setup-android@v3 | |
| - name: Test, lint, and assemble Android | |
| run: ./apps/android/gradlew -p apps/android testDebugUnitTest lintDebug assembleDebug | |
| - name: Upload Android reports on failure | |
| if: failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: android-reports | |
| path: | | |
| apps/android/app/build/reports | |
| apps/android/app/build/outputs/lint-results-debug.* |