ci: skip live e2e tests on fork PRs#654
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughSummary by CodeRabbitRelease Notes
WalkthroughThe changes implement a mechanism to skip live end-to-end tests for pull requests from forked repositories. A GitHub Actions workflow now conditionally sets Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/workflows/test.yaml:
- Around line 60-62: The "Flag fork PR" step's condition uses
github.event.pull_request.head.repo.full_name without first ensuring the event
is a pull_request, causing push and merge events to treat null as an empty
string and erroneously set SKIP_LIVE_TESTS; update the condition on the "Flag
fork PR" step to first check that github.event_name equals "pull_request" and
only then compare github.event.pull_request.head.repo.full_name against
"netlify/primitives" so SKIP_LIVE_TESTS is set only for forked pull requests.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 5e3ca105-28cc-4263-acb1-9f5eb4118f0b
📒 Files selected for processing (2)
.github/workflows/test.yamlpackages/vite-plugin-tanstack-start/test/e2e/build.test.ts
056fbf0 to
a4e396f
Compare
a4e396f to
dfdaf69
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: dfdaf699fa
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if: | ||
| ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != | ||
| 'netlify/primitives' }} | ||
| run: echo "SKIP_LIVE_TESTS=true" >> "$GITHUB_ENV" |
There was a problem hiding this comment.
Write SKIP_LIVE_TESTS using a shell-agnostic command
This step executes in the test matrix on windows-latest as well, but echo "SKIP_LIVE_TESTS=true" >> "$GITHUB_ENV" uses Bash-style variable expansion. Because no shell override is set, Windows runners use PowerShell, where this expression does not resolve the environment file path correctly, so fork PR jobs can fail here instead of skipping live tests. Please either force shell: bash or use PowerShell-compatible syntax (and apply the same fix to the later $GITHUB_STEP_SUMMARY writes).
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
GHA defaults to bash even on Windows runners!
Some tests always fail on PRs from forks. This is a poor experience for external contributors as well as for maintainers, and it does not foster OSS contributions.
Skip tests that require access to secrets and use GitHub "annotations" to remind maintainers that this has happened.