Skip to content

Recover interrupted chats across devices #2541

Recover interrupted chats across devices

Recover interrupted chats across devices #2541

Workflow file for this run

name: CI
on:
push:
pull_request:
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- run: npm ci
- run: npm run lint
- run: npm run test:unit
- run: npm run build
env:
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY: ${{ vars.NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY }}
CLERK_SECRET_KEY: ${{ secrets.CLERK_SECRET_KEY }}
NEXT_PUBLIC_API_BASE_URL: ${{ vars.NEXT_PUBLIC_API_BASE_URL }}
- run: npx playwright install --with-deps chromium
- run: npm run test:ui
env:
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY: ${{ vars.NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY }}
CLERK_SECRET_KEY: ${{ secrets.CLERK_SECRET_KEY }}
NEXT_PUBLIC_API_BASE_URL: ${{ vars.NEXT_PUBLIC_API_BASE_URL }}
sync-enclave-integration:
# Live smoke test against the sync enclave. Gated on the repo
# variable `SYNC_ENCLAVE_URL` being set; when absent, the job
# short-circuits so forks and PRs from contributors without
# staging access don't fail.
runs-on: ubuntu-latest
if: ${{ vars.SYNC_ENCLAVE_URL != '' }}
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
# GitHub does not evaluate `secrets.*` inside an `if:` expression,
# so a job-level secret check would always be true. Probe the
# secret here and expose a plain boolean output the later steps
# can gate on, otherwise the integration test would run with an
# empty JWT and the workflow would pass without actually hitting
# the enclave.
- id: jwt-guard
run: |
if [ -n "$SYNC_ENCLAVE_TEST_JWT" ]; then
echo "have_jwt=true" >> "$GITHUB_OUTPUT"
else
echo "have_jwt=false" >> "$GITHUB_OUTPUT"
echo "::warning::SYNC_ENCLAVE_TEST_JWT not set; skipping integration tests"
fi
env:
SYNC_ENCLAVE_TEST_JWT: ${{ secrets.SYNC_ENCLAVE_TEST_JWT }}
- if: steps.jwt-guard.outputs.have_jwt == 'true'
run: npm ci
- if: steps.jwt-guard.outputs.have_jwt == 'true'
run: npm run test:integration
env:
SYNC_ENCLAVE_URL: ${{ vars.SYNC_ENCLAVE_URL }}
SYNC_ENCLAVE_TEST_JWT: ${{ secrets.SYNC_ENCLAVE_TEST_JWT }}