test: Add #[serial] to GitHub env var tests#2832
Merged
runningcode merged 1 commit intomasterfrom Oct 9, 2025
Merged
Conversation
Add #[serial(github_env)] attribute to test_get_github_pr_number and test_get_github_base_ref to prevent parallel execution with other tests that manipulate GitHub environment variables. Also rename the serial key from github_event_path to github_env to better reflect that it covers all GitHub environment variables (GITHUB_EVENT_PATH, GITHUB_EVENT_NAME, GITHUB_REF, GITHUB_BASE_REF). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
47654ff to
76b072b
Compare
|
|
||
| #[test] | ||
| #[serial(github_event_path)] | ||
| #[serial(github_env)] |
There was a problem hiding this comment.
Bug: Test Grouping Issue Causes Interference
Changing the #[serial] attribute from github_event_path to github_env groups tests manipulating GITHUB_EVENT_PATH with tests that use other GITHUB_* environment variables. This removes the logical separation for tests relying on GITHUB_EVENT_PATH, potentially causing interference.
Additional Locations (1)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
#[serial(github_env)]totest_get_github_pr_number#[serial(github_env)]totest_get_github_base_refgithub_event_pathtogithub_envfor all testsThese tests manipulate GitHub environment variables (
GITHUB_EVENT_PATH,GITHUB_EVENT_NAME,GITHUB_REF,GITHUB_BASE_REF) and should not run in parallel with other tests that use the same environment variables to avoid race conditions.The serial key has been renamed from
github_event_pathtogithub_envto better reflect that it encompasses all GitHub environment variables, not justGITHUB_EVENT_PATH.🤖 Generated with Claude Code