Skip to content

Conversation

@seanmcguire12
Copy link
Member

@seanmcguire12 seanmcguire12 commented Dec 1, 2025

why

  • our e2e:local tests now require LLM API keys
  • these are currently unavailable during the e2e:local step in CI, which causes them to fail

what changed

  • added the relevant LLM API keys to the env in CI

Summary by cubic

Fixes failing e2e:local tests in CI by skipping forks and passing the required API keys to the job.

Why:

  • E2E local tests were failing due to missing secrets and forked PRs not having access to them.

What:

  • Added job condition to run only on pushes and same-repo PRs (skip forks).
  • Passed required env secrets: OPENAI_API_KEY, ANTHROPIC_API_KEY, GOOGLE_GENERATIVE_AI_API_KEY, BROWSERBASE_API_KEY, BROWSERBASE_PROJECT_ID.
  • Added ANTHROPIC_API_KEY to turbo.json env for the e2e:local task.

Test Plan:

  • Push a branch in this repo: e2e:local job runs and passes.
  • Open a PR from this repo: job runs and external API calls succeed.
  • Open a PR from a fork: e2e:local job is skipped.
  • Run tests locally with required API keys set: tests pass.

Written for commit 7eb1ed9. Summary will update automatically on new commits.

@changeset-bot
Copy link

changeset-bot bot commented Dec 1, 2025

⚠️ No Changeset found

Latest commit: 7eb1ed9

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@seanmcguire12 seanmcguire12 changed the title fix e2e local tests in CI [chore]: fix e2e local tests in CI Dec 1, 2025
Copy link

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Dec 1, 2025

Greptile Overview

Greptile Summary

Added required API keys to the run-e2e-local-tests job environment variables to fix test failures in CI. The change includes OPENAI_API_KEY, GOOGLE_GENERATIVE_AI_API_KEY, BROWSERBASE_API_KEY, and BROWSERBASE_PROJECT_ID which are necessary for running e2e tests that use agent functionality (like agent-streaming.spec.ts).

Additionally added a conditional check to prevent this job from running on fork pull requests where these secrets would not be available:

  • Runs on push events (main branch)
  • Runs on pull_request events only when the PR is from the same repository

This prevents fork contributors from seeing failures due to missing secrets they cannot access.

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • The changes are straightforward environment variable additions and a conditional check that aligns with standard GitHub Actions practices. The API keys being added (OPENAI_API_KEY, GOOGLE_GENERATIVE_AI_API_KEY, BROWSERBASE_API_KEY, BROWSERBASE_PROJECT_ID) match the same keys already used in the run-e2e-bb-tests job (lines 245-249), indicating this was an oversight rather than introducing new dependencies. The conditional check pattern is identical to the one used in run-e2e-bb-tests (lines 241-243), ensuring consistency across jobs.
  • No files require special attention

Important Files Changed

File Analysis

Filename Score Overview
.github/workflows/ci.yml 5/5 Added missing API keys (OPENAI_API_KEY, GOOGLE_GENERATIVE_AI_API_KEY, BROWSERBASE_API_KEY, BROWSERBASE_PROJECT_ID) to environment variables and added conditional execution to prevent fork PRs from failing due to missing secrets

Sequence Diagram

sequenceDiagram
    participant GHA as GitHub Actions
    participant Job as run-e2e-local-tests
    participant Secrets as GitHub Secrets
    participant Tests as E2E Test Suite
    participant APIs as External APIs

    GHA->>Job: Trigger job (on push or PR)
    
    alt Fork PR (external repo)
        Job->>Job: Check: head.repo != base.repo
        Job-->>GHA: Skip (no access to secrets)
    else Same repo PR or push
        Job->>Job: Check: head.repo == base.repo
        Job->>Secrets: Fetch OPENAI_API_KEY
        Job->>Secrets: Fetch GOOGLE_GENERATIVE_AI_API_KEY
        Job->>Secrets: Fetch BROWSERBASE_API_KEY
        Job->>Secrets: Fetch BROWSERBASE_PROJECT_ID
        Job->>Secrets: Fetch ANTHROPIC_API_KEY
        Secrets-->>Job: Return all API keys
        Job->>Job: Set environment variables
        Job->>Tests: Run e2e:local tests
        Tests->>APIs: Make API calls (using keys)
        APIs-->>Tests: Return responses
        Tests-->>Job: Test results
        Job-->>GHA: Success/Failure
    end
Loading

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 file reviewed, no comments

Edit Code Review Agent Settings | Greptile

@seanmcguire12 seanmcguire12 merged commit 4082b65 into main Dec 1, 2025
28 of 29 checks passed
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.

3 participants