Skip to content

fix(backups): secure pCloud setup and durable conversation exports #27453

fix(backups): secure pCloud setup and durable conversation exports

fix(backups): secure pCloud setup and durable conversation exports #27453

Workflow file for this run

name: Web Checks
on:
# Nightly calls run these same jobs against one immutable main snapshot.
workflow_call:
inputs:
nightly_main_sha:
description: Main SHA pinned by the unfiltered nightly caller
type: string
required: false
default: ''
push:
branches: main
# Superset of the detect-changes has_frontend/has_web_app/has_admin/
# has_personas filters that gate this workflow's jobs, so a main push
# that cannot wake any of them skips the workflow entirely.
paths:
- 'web/frontend/**'
- 'web/app/**'
- 'web/admin/**'
- 'web/personas-open-source/**'
- 'web/packages/note-shared/**'
- 'firestore.indexes.json'
- '.github/actions/detect-changes/**'
- '.github/workflows/web-checks.yml'
pull_request:
branches: main
concurrency:
group: web-checks-${{ github.event.pull_request.number || github.ref }}-${{ inputs.nightly_main_sha != '' && format('nightly-{0}', github.run_id) || 'normal' }}
# A newer PR push supersedes that PR's older run. A newer main push must not
# cancel the running one: with cancel-in-progress false GitHub replaces only
# the pending run in the group, so the running SHA finishes and the newest
# pending SHA runs next — main always gets a complete run.
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
env:
# Abort a git HTTP transfer that stays under 1 KB/s for 60 s, so actions/checkout
# retries instead of hanging 7-10 min until the TCP reset (#22890).
GIT_HTTP_LOW_SPEED_LIMIT: "1000"
GIT_HTTP_LOW_SPEED_TIME: "60"
jobs:
changes:
name: Detect Changes
runs-on: ubuntu-latest
timeout-minutes: 15
outputs:
has_admin: ${{ inputs.nightly_main_sha != '' && 'true' || (steps.changes.outputs.has_admin) }}
has_frontend: ${{ inputs.nightly_main_sha != '' && 'true' || (steps.changes.outputs.has_frontend) }}
has_personas: ${{ inputs.nightly_main_sha != '' && 'true' || (steps.changes.outputs.has_personas) }}
has_web_app: ${{ inputs.nightly_main_sha != '' && 'true' || (steps.changes.outputs.has_web_app) }}
has_web_build: ${{ inputs.nightly_main_sha != '' && 'true' || (steps.changes.outputs.has_web_build) }}
has_web_lint: ${{ inputs.nightly_main_sha != '' && 'true' || (steps.changes.outputs.has_web_lint) }}
steps:
- name: Checkout code
uses: actions/checkout@v7
with:
ref: ${{ inputs.nightly_main_sha || github.sha }}
# detect-changes diffs against the merge base, so it needs history;
# blob:none skips file contents, which is what made the unfiltered
# clone of this ~1.25GB repo take minutes.
fetch-depth: 0
filter: blob:none
- name: Detect changed paths
id: changes
uses: ./.github/actions/detect-changes
frontend-lint:
name: Frontend Lint
runs-on: ubuntu-latest
needs: changes
if: needs.changes.outputs.has_web_lint == 'true'
timeout-minutes: 15
steps:
- name: Checkout code
uses: actions/checkout@v7
with:
ref: ${{ inputs.nightly_main_sha || github.sha }}
# Lint/test only reads the worktree; no git history is consulted.
fetch-depth: 1
- name: Setup Node.js
uses: actions/setup-node@v7
with:
node-version: '20'
cache: 'npm'
cache-dependency-path: |
web/frontend/package-lock.json
web/personas-open-source/package-lock.json
- name: Lint Frontend
if: needs.changes.outputs.has_frontend == 'true'
working-directory: ./web/frontend
run: |
npm ci
npm run lint
npm run lint:format -- --check
- name: Run Frontend Tests
if: needs.changes.outputs.has_frontend == 'true'
run: bash scripts/run-web-frontend-tests.sh
- name: Lint Personas
if: needs.changes.outputs.has_personas == 'true'
working-directory: ./web/personas-open-source
run: |
npm ci --legacy-peer-deps
npm run lint
npm test
build:
name: Build
runs-on: ubuntu-latest
needs: changes
if: needs.changes.outputs.has_web_build == 'true'
timeout-minutes: 15
steps:
- name: Checkout code
uses: actions/checkout@v7
with:
ref: ${{ inputs.nightly_main_sha || github.sha }}
# Builds only read the worktree; no git history is consulted.
fetch-depth: 1
- name: Setup Node.js
uses: actions/setup-node@v7
with:
node-version: '20'
cache: 'npm'
cache-dependency-path: |
web/admin/package-lock.json
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: 1.3.14
- name: Build Web App
if: needs.changes.outputs.has_web_app == 'true'
working-directory: ./web/app
env:
NEXT_PUBLIC_API_BASE_URL: https://api.omi.me
NEXT_PUBLIC_FIREBASE_API_KEY: dummy
NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN: dummy.firebaseapp.com
NEXT_PUBLIC_FIREBASE_PROJECT_ID: dummy
NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET: dummy.appspot.com
NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID: "123456789"
NEXT_PUBLIC_FIREBASE_APP_ID: "1:123456789:web:dummy"
NEXT_PUBLIC_FIREBASE_VAPID_KEY: dummy
run: |
bun install --frozen-lockfile
bun run build
- name: Build Admin Dashboard
if: needs.changes.outputs.has_admin == 'true'
working-directory: ./web/admin
env:
NEXT_PUBLIC_FIREBASE_API_KEY: dummy
NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN: dummy.firebaseapp.com
NEXT_PUBLIC_FIREBASE_PROJECT_ID: dummy
NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET: dummy.appspot.com
NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID: "123456789"
NEXT_PUBLIC_FIREBASE_APP_ID: "1:123456789:web:dummy"
NEXT_PUBLIC_FIREBASE_VAPID_KEY: dummy
NEXT_PUBLIC_PLUGINS_APP_ID: dummy
NEXT_PUBLIC_OMI_API_URL: https://api.omiapi.com
run: |
npm ci
npm run lint
npm run typecheck
npm test
npm run build