Commit 7df6364
authored
Add CI workflow and API sync test to catch command drift (#18)
* feat: add CI workflow and API sync test to catch command drift
Adds a GitHub Actions CI workflow that runs lint and tests on every PR
and push to main — previously only release tags triggered any CI.
Adds src/api-sync.test.ts which fetches the live OpenAPI spec and
hard-fails if:
- client.ts has commands the server no longer exposes (stale)
- the server has endpoints not yet in client.ts (missing)
Undocumented-but-confirmed endpoints are tracked in UNDOCUMENTED_IN_SPEC
(get_location, storage, deposit_credits, withdraw_credits, drone commands,
v2 state commands).
Running the test found and fixes several more stale/missing commands:
- Removed: buy_ship, get_ships (explicitly deprecated by server), get_recipes,
shipyard_showroom, set_anonymous (all 404)
- Added: fleet, get_notifications, name_ship (in spec but missing from client)
Skips gracefully on 429 (rate limiting) rather than failing CI.
Set SKIP_API_SYNC=1 to skip locally.
* fix: use file paths in CI test steps (bun doesn't support regex as name filter)1 parent ff16ef6 commit 7df6364
4 files changed
Lines changed: 151 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
159 | 159 | | |
160 | 160 | | |
161 | 161 | | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | | - | |
| 162 | + | |
167 | 163 | | |
168 | 164 | | |
169 | 165 | | |
| |||
282 | 278 | | |
283 | 279 | | |
284 | 280 | | |
285 | | - | |
286 | | - | |
287 | 281 | | |
288 | 282 | | |
289 | 283 | | |
| |||
406 | 400 | | |
407 | 401 | | |
408 | 402 | | |
409 | | - | |
410 | 403 | | |
411 | 404 | | |
412 | 405 | | |
| |||
448 | 441 | | |
449 | 442 | | |
450 | 443 | | |
451 | | - | |
452 | 444 | | |
453 | 445 | | |
454 | 446 | | |
455 | | - | |
456 | 447 | | |
457 | 448 | | |
458 | 449 | | |
459 | 450 | | |
460 | 451 | | |
461 | 452 | | |
| 453 | + | |
462 | 454 | | |
463 | 455 | | |
464 | 456 | | |
| |||
476 | 468 | | |
477 | 469 | | |
478 | 470 | | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
479 | 476 | | |
480 | 477 | | |
481 | 478 | | |
| |||
1225 | 1222 | | |
1226 | 1223 | | |
1227 | 1224 | | |
1228 | | - | |
| 1225 | + | |
1229 | 1226 | | |
1230 | 1227 | | |
1231 | 1228 | | |
| |||
1743 | 1740 | | |
1744 | 1741 | | |
1745 | 1742 | | |
1746 | | - | |
1747 | 1743 | | |
1748 | 1744 | | |
1749 | 1745 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
630 | 630 | | |
631 | 631 | | |
632 | 632 | | |
| 633 | + | |
633 | 634 | | |
634 | 635 | | |
635 | 636 | | |
636 | 637 | | |
637 | 638 | | |
638 | 639 | | |
639 | 640 | | |
| 641 | + | |
640 | 642 | | |
641 | 643 | | |
642 | 644 | | |
643 | 645 | | |
644 | 646 | | |
645 | 647 | | |
646 | 648 | | |
| 649 | + | |
647 | 650 | | |
648 | 651 | | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
649 | 657 | | |
650 | 658 | | |
651 | 659 | | |
| |||
0 commit comments