-
Notifications
You must be signed in to change notification settings - Fork 28
chore(ci): wire required PR/push validation workflow (#1278) #1284
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
89014b4
6f7b4eb
59e8fd5
1e33342
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -335,7 +335,7 @@ async function migrateLegacyLayout( | |||||||
| try { | ||||||||
| parsed = yaml.load(yamlContent, { schema: yaml.JSON_SCHEMA }); | ||||||||
| } catch (e) { | ||||||||
| throw new Error(`Invalid YAML: ${e instanceof Error ? e.message : e}`); | ||||||||
| throw new Error(`Invalid YAML: ${e instanceof Error ? e.message : e}`, { cause: e }); | ||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧹 Nitpick | 🔵 Trivial Align non-Error fallback with the explicit Line 338 uses implicit template-literal coercion for the non-Error branch ( ♻️ Proposed alignment- throw new Error(`Invalid YAML: ${e instanceof Error ? e.message : e}`, { cause: e });
+ const message = e instanceof Error ? e.message : String(e);
+ throw new Error(`Invalid YAML: ${message}`, { cause: e });📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||
| } | ||||||||
|
|
||||||||
| const layout = LayoutFileSchema.safeParse(parsed); | ||||||||
|
|
@@ -467,7 +467,7 @@ export async function saveLayout( | |||||||
| parsed = yaml.load(yamlContent, { schema: yaml.JSON_SCHEMA }); | ||||||||
| } catch (e) { | ||||||||
| const message = e instanceof Error ? e.message : String(e); | ||||||||
| throw new Error(`Invalid YAML: ${message}`); | ||||||||
| throw new Error(`Invalid YAML: ${message}`, { cause: e }); | ||||||||
| } | ||||||||
|
|
||||||||
| // Validate layout schema | ||||||||
|
|
||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -104,6 +104,17 @@ Use it to: | |
|
|
||
| **Note:** Dev deployment only succeeds if lint and tests pass. | ||
|
|
||
| ### Required CI Checks | ||
|
|
||
| Branch protection should require the core CI validation check from `.github/workflows/test.yml`: | ||
|
|
||
| - **Check name:** `Test / validate` | ||
|
|
||
| This check runs on: | ||
|
|
||
| - Pull requests targeting `main` (pre-merge gate) | ||
| - Pushes to `main` (post-merge validation) | ||
|
Comment on lines
+107
to
+116
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧹 Nitpick | 🔵 Trivial
CI branch-protection check configuration is not an environment topic. As the heading hierarchy stands, this section appears as a child of Consider either promoting it to a top-level As per coding guidelines: 🧰 Tools🪛 LanguageTool[uncategorized] ~109-~109: The official name of this software platform is spelled with a capital “H”. (GITHUB) 🤖 Prompt for AI Agents |
||
|
|
||
| ## Philosophy | ||
|
|
||
| We follow the **Testing Trophy** approach: | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: RackulaLives/Rackula
Length of output: 1465
🏁 Script executed:
Repository: RackulaLives/Rackula
Length of output: 124
🏁 Script executed:
# Check git history for test.yml to see if concurrency was recently added git log --oneline -20 -- .github/workflows/test.ymlRepository: RackulaLives/Rackula
Length of output: 132
🏁 Script executed:
Repository: RackulaLives/Rackula
Length of output: 722
🏁 Script executed:
Repository: RackulaLives/Rackula
Length of output: 46
🏁 Script executed:
# Get more context on the git commit that added this git show 89014b4 --statRepository: RackulaLives/Rackula
Length of output: 50377
🏁 Script executed:
Repository: RackulaLives/Rackula
Length of output: 510
🏁 Script executed:
Repository: RackulaLives/Rackula
Length of output: 2438
🏁 Script executed:
Repository: RackulaLives/Rackula
Length of output: 756
🏁 Script executed:
Repository: RackulaLives/Rackula
Length of output: 412
🏁 Script executed:
Repository: RackulaLives/Rackula
Length of output: 130
🏁 Script executed:
Repository: RackulaLives/Rackula
Length of output: 435
Correct the concurrency expression to safely guard
workflow_callinvocations.The concurrency group expression has a logic issue: for
workflow_callevents,github.event.pull_request.numberis never populated (the event type isworkflow_call, notpull_request), andgithub.refreflects the caller's ref. This means concurrent invocations from a single caller could unnecessarily cancel each other. Additionally,github.refis always non-empty, making the|| github.run_idfallback unreachable.While
test.ymlcurrently has no caller workflows in the repository, theworkflow_calltrigger is declared in theon:section. To future-proof and correctly handle all event types:🔧 Proposed fix
With this expression:
pull_request→ uses PR number (deduplicates reruns on the same PR) ✅pushtomain→ uses ref (cancels superseded pushes) ✅workflow_dispatch→ uses ref (cancels duplicate dispatches on same branch) ✅workflow_call→ uses uniquerun_id(each invocation is independent, no mutual cancellation) ✅📝 Committable suggestion
🤖 Prompt for AI Agents