mirror of
https://github.com/ModernRelay/omnigraph.git
synced 2026-06-27 02:39:38 +02:00
Fold openapi.json auto-sync into main CI test job
The separate openapi-sync workflow was duplicating the workspace build (~15 min cold-cache compile), paying the cost twice per PR. Fold the regen + auto-commit into the existing test job: one compile, shared rust-cache, same drift-check semantics. - Same-repo PRs: OMNIGRAPH_UPDATE_OPENAPI=1 during the test run, then commit the regenerated spec back to the PR branch - Fork PRs / pushes: env var empty, test stays in strict drift-check mode - openapi_spec_is_up_to_date treats empty env value as unset, so the conditional workflow env expression works Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
9de2079263
commit
a157f6a17c
3 changed files with 42 additions and 64 deletions
|
|
@ -971,7 +971,10 @@ fn openapi_spec_is_up_to_date() {
|
|||
|
||||
let generated = serde_json::to_string_pretty(&openapi_doc()).unwrap() + "\n";
|
||||
|
||||
if env::var("OMNIGRAPH_UPDATE_OPENAPI").is_ok() {
|
||||
if !env::var("OMNIGRAPH_UPDATE_OPENAPI")
|
||||
.unwrap_or_default()
|
||||
.is_empty()
|
||||
{
|
||||
fs::write(&spec_path, &generated).unwrap();
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue