feat: replace the OMP-hosted appserver with the T4 host #328
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: | |
| push: | |
| branches: [main, master] | |
| pull_request: | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ci-${{ github.workflow }}-${{ github.event_name }}-${{ github.event_name == 'pull_request' && github.ref || github.sha }} | |
| cancel-in-progress: ${{ github.event_name == 'pull_request' }} | |
| jobs: | |
| core: | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 25 | |
| steps: | |
| - name: Check out source | |
| uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4 | |
| with: | |
| version: 11.10.0 | |
| - name: Install Node.js | |
| uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 | |
| with: | |
| node-version: 24.13.1 | |
| cache: pnpm | |
| - name: Install Bun for the T4 host packages | |
| uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0 | |
| with: | |
| bun-version: 1.3.14 | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Install browser for end-to-end tests | |
| run: pnpm exec playwright install --with-deps chromium | |
| - name: Check source and types | |
| run: pnpm check | |
| - name: Run tests | |
| run: pnpm test | |
| - name: Build all workspaces | |
| run: pnpm build | |
| - name: Run built-app end-to-end tests | |
| run: pnpm test:e2e | |
| - name: Check packaging contract | |
| run: pnpm test:packaging | |
| legacy-bridge-continuity: | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 20 | |
| steps: | |
| - name: Check out exact T4 source | |
| uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | |
| with: | |
| ref: ${{ github.event.pull_request.head.sha || github.sha }} | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4 | |
| with: | |
| version: 11.10.0 | |
| - name: Install Node.js | |
| uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 | |
| with: | |
| node-version: 24.13.1 | |
| cache: pnpm | |
| - name: Install Bun | |
| uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0 | |
| with: | |
| bun-version: 1.3.14 | |
| - name: Install continuity prerequisites | |
| run: sudo apt-get update && sudo apt-get install --yes expect | |
| - name: Install T4 dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Resolve pinned OMP authority source | |
| id: authority | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| source_repository="$(jq -er '.sourceRepository' provenance/omp-host-migration.json)" | |
| test "$source_repository" = "https://github.com/lyc-aon/oh-my-pi" | |
| sha="$(jq -er '.inputs.operationsContinuity' provenance/omp-host-migration.json)" | |
| [[ "$sha" =~ ^[0-9a-f]{40}$ ]] | |
| echo "repository=lyc-aon/oh-my-pi" >> "$GITHUB_OUTPUT" | |
| echo "sha=$sha" >> "$GITHUB_OUTPUT" | |
| - name: Check out pinned OMP authority source | |
| uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | |
| with: | |
| repository: ${{ steps.authority.outputs.repository }} | |
| ref: ${{ steps.authority.outputs.sha }} | |
| path: .continuity/omp | |
| - name: Install OMP authority dependencies | |
| working-directory: .continuity/omp | |
| run: bun install --frozen-lockfile | |
| - name: Build OMP native addon | |
| working-directory: .continuity/omp | |
| run: bun run build:native | |
| - name: Run legacy bridge continuity gate | |
| env: | |
| T4_OMP_SOURCE_DIR: ${{ github.workspace }}/.continuity/omp | |
| run: pnpm test:legacy-bridge-continuity | |
| - name: Upload continuity evidence | |
| if: ${{ always() }} | |
| uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 | |
| with: | |
| name: legacy-bridge-continuity-${{ github.run_id }} | |
| path: artifacts/legacy-bridge-continuity/ | |
| if-no-files-found: error | |
| retention-days: 14 | |
| tooling: | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 25 | |
| steps: | |
| - name: Check out source | |
| uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4 | |
| with: | |
| version: 11.10.0 | |
| - name: Install Node.js | |
| uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 | |
| with: | |
| node-version: 24.13.1 | |
| cache: pnpm | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Run tooling regression tests | |
| run: pnpm test:tooling | |
| android-debug: | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 35 | |
| steps: | |
| - name: Check out source | |
| uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4 | |
| with: | |
| version: 11.10.0 | |
| - name: Install Node.js | |
| uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 | |
| with: | |
| node-version: 24.13.1 | |
| cache: pnpm | |
| - name: Install Java | |
| uses: actions/setup-java@c1e323688fd81a25caa38c78aa6df2d33d3e20d9 # v4 | |
| with: | |
| distribution: temurin | |
| java-version: "21" | |
| cache: gradle | |
| - name: Install Android SDK | |
| uses: android-actions/setup-android@9fc6c4e9069bf8d3d10b2204b1fb8f6ef7065407 # v3 | |
| - name: Install pinned Android platform and build tools | |
| run: sdkmanager --install "platforms;android-36" "build-tools;36.0.0" | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Build web application | |
| run: pnpm build:web | |
| - name: Verify unsigned Android debug application | |
| run: pnpm --filter @t4-code/mobile check:android:debug | |
| verify: | |
| name: verify | |
| if: ${{ always() }} | |
| needs: [core, legacy-bridge-continuity, tooling, android-debug] | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 5 | |
| steps: | |
| - name: Require every CI leg | |
| shell: bash | |
| env: | |
| CORE_RESULT: ${{ needs.core.result }} | |
| CONTINUITY_RESULT: ${{ needs.legacy-bridge-continuity.result }} | |
| TOOLING_RESULT: ${{ needs.tooling.result }} | |
| ANDROID_RESULT: ${{ needs.android-debug.result }} | |
| run: | | |
| set -euo pipefail | |
| test "$CORE_RESULT" = success | |
| test "$CONTINUITY_RESULT" = success | |
| test "$TOOLING_RESULT" = success | |
| test "$ANDROID_RESULT" = success |