Skip to content

ci(e2e): enable Google Calendar E2E suites in workflow - #293

Merged
h4yfans merged 1 commit into
mainfrom
ci/enable-calendar-e2e
Apr 20, 2026
Merged

ci(e2e): enable Google Calendar E2E suites in workflow#293
h4yfans merged 1 commit into
mainfrom
ci/enable-calendar-e2e

Conversation

@h4yfans

@h4yfans h4yfans commented Apr 20, 2026

Copy link
Copy Markdown
Collaborator

Summary

Enables the two Calendar E2E suites landed in #291 to actually run in CI by wiring the GOOGLE_CALENDAR_E2E_* repo secrets into the Playwright Electron job.

What changes: one env: block added to the "Run Electron E2E tests" step in .github/workflows/e2e.yml. 9 lines.

GOOGLE_CALENDAR_E2E: '1'
GOOGLE_CALENDAR_E2E_REFRESH_TOKEN: ${{ secrets.GOOGLE_CALENDAR_E2E_REFRESH_TOKEN }}
GOOGLE_CALENDAR_E2E_CLIENT_ID: ${{ secrets.GOOGLE_CALENDAR_E2E_CLIENT_ID }}
GOOGLE_CALENDAR_E2E_CLIENT_SECRET: ${{ secrets.GOOGLE_CALENDAR_E2E_CLIENT_SECRET }}

What this unblocks

Suite Before After
calendar-google-two-way-sync.e2e.ts (Google → Memry) skipped (no flag) runs, ~7s
calendar-google-writeback.e2e.ts (Memry → Google) skipped (no flag) runs, ~7s
calendar-push-channels.e2e.ts (webhook round-trip) skipped (by design) skipped (by design)

Push-channels remain skipped until the staging Memry sync-auth user is provisioned — unchanged from #291.

Safety

  • Forks: can't access secrets → env vars resolve to empty strings → CREDS_PRESENT check fails → test.skip fires at the describe level. Forked PRs still pass E2E.
  • Exposure: secrets are scoped to the one Playwright step, not the whole workflow. Easy to remove if we ever split the job.
  • Cost: per CI run on main, Calendar suites make ~7 Google API calls (auth refresh + 1 event create + 1 sync + 1 GET + 1 delete × 2 suites). Negligible against Google's quota.

Out of scope (follow-up)

Current triggers on e2e.yml:

```yaml
on:
push:
branches: [main]
workflow_dispatch:
```

Calendar E2E will only run post-merge to main. To actually gate PRs on Calendar health, add a pull_request: trigger. I left this out because:

  • It's a bigger decision (every PR burns minutes + Google API calls, even unrelated ones)
  • Current behavior already catches regressions on main fast enough that devs can revert before they cascade
  • If you want PR-gating, trivial follow-up: add pull_request: with an optional paths: filter on apps/desktop/** to scope the cost

Testing this PR

Can't — this PR changes the workflow, but the workflow only triggers on push-to-main. Options for validation:

  1. Merge, watch the next push-to-main CI run — pragmatic, the change is 9 lines of YAML
  2. Manual workflow_dispatch on this branch post-merge to exercise before the next feature lands
  3. One-off: temporarily add pull_request: trigger in a throwaway commit — overkill

Recommending option 1. The change is small and review-verifiable.

Test plan

  • Workflow YAML passes GitHub's parser (PR creation implies validation)
  • Reviewer: confirm the three secrets are present in repo Settings → Secrets → Actions (they were, as of 2026-04-20 06:44 UTC)
  • Post-merge: next main-branch push should show the Calendar suites executing (not skipping) in the E2E job logs

Wires the GOOGLE_CALENDAR_E2E_* repo secrets (configured 2026-04-20) into the
Playwright Electron job and flips GOOGLE_CALENDAR_E2E=1 so the two Calendar
suites landed in #291 actually exercise the real Google Calendar API in CI:

  - calendar-google-two-way-sync.e2e.ts (Google → Memry import)
  - calendar-google-writeback.e2e.ts    (Memry → Google write-back)

Without this, both suites' `CREDS_PRESENT` gate was false in CI and they
skipped silently — the tests were landed but not actually running.

Why per-step env (not workflow-level):
  The secrets are only needed for the Playwright step. Scoping to the step
  limits exposure and makes it easy to remove if we ever split the E2E job.

Forks are still safe:
  Forked repos can't access secrets, so the env vars will be empty strings
  in their CI. The Calendar suites' CREDS_PRESENT check demands non-empty
  values and short-circuits the whole describe block via test.skip, so
  forks' E2E jobs continue to pass without the Calendar suites executing.

Trigger scope unchanged:
  e2e.yml still runs only on push-to-main + manual workflow_dispatch — the
  Calendar suites will gate main-branch health post-merge, not individual
  PRs. Adding a `pull_request:` trigger is a bigger policy decision (cost
  and Google API usage) and is intentionally out of scope here; tracked as
  a follow-up.
@h4yfans
h4yfans merged commit 9164f82 into main Apr 20, 2026
4 checks passed
@h4yfans
h4yfans deleted the ci/enable-calendar-e2e branch May 6, 2026 16:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant