Commit d81d182
authored
Ci pinned services stack (#121)
* update ci tests to use pinned local services stack
Stop test and coverage workflows from tunneling to production by downloading RaidHub-Services at a pinned commit, booting its docker dependencies locally, and running migrations/seeding before API tests.
Made-with: Cursor
* move services pin file to avoid remote path conflict
Rename the pinned RaidHub-Services version file to .github/raidhub-services-version.env and update the CI setup script to use it so branch pushes succeed against the current remote.
Made-with: Cursor
* use services make env in ci bootstrap script
Replace manual .env key injection with RaidHub-Services' make env target so CI setup follows the same environment bootstrap path as services.
Made-with: Cursor
* use real postgres fixtures in status integration tests
Create and clean up deterministic instance/pgcr rows inside status tests so they validate route behavior against real database state instead of mocking instance reads.
Made-with: Cursor
* lazy-init database clients to reduce import-time coupling
Avoid creating Postgres and ClickHouse clients at module import time by switching to lazy singletons, so one-off scripts like docs generation can load route modules without unnecessary DB setup.
Made-with: Cursor
* format
* bump pinned services commit for ci schema parity
Update the pinned RaidHub-Services SHA used by CI so migrations and seeded schemas match API test query expectations.
Made-with: Cursor
* stabilize ci tests with local-db assumptions
Remove dependency on non-portable activity_version columns and update brittle tests to use local database-backed fixtures or discovered rows so the CI stack seeded from RaidHub-Services can run reliably.
Made-with: Cursor
* format player fixture test for ci checks
Apply Prettier formatting to the updated player service fixture test so static PR checks pass.
Made-with: Cursor
* make dataset-dependent tests resilient for local ci data
Update pgcr, player search, and weapon metrics tests to validate schema and bounds without requiring production-sized datasets, so they run reliably against locally seeded CI infrastructure.
Made-with: Cursor
* format pgcr service test for static checks
Run Prettier on pgcr service test to satisfy CI formatting checks.
Made-with: Cursor
* make integration tests tolerant of seeded local datasets
Relax strict non-empty expectations in dataset-dependent tests and allow nullable leaderboard search results so CI can validate shapes/behavior against the local seeded stack instead of production-sized data.
Made-with: Cursor
* stabilize instance service tests for local seeded db
Switch instance service tests from hardcoded production instance IDs to dynamic local rows and schema checks so they pass against ephemeral CI seed data.
Made-with: Cursor
* remove remaining prod-data assumptions in service tests
Relax atlas and reporting standing assertions for seeded CI data and fix instance metadata test hash typing to avoid integer overflow against bigint hashes.
Made-with: Cursor
* stabilize player and clan tests for local ci data
Use DB-discovered membership IDs in player route tests and relax fixed-size clan leaderboard assertions so these tests pass against seeded local datasets.
Made-with: Cursor
* use discovered player ids in history and teammates route tests
Replace hardcoded membership IDs with DB-discovered public/private players and make middleware assertions robust to seeded CI datasets.
Made-with: Cursor
* make expectOk/expectErr only assert result type
Route errors now include parsed context payloads, so shared test helpers should not require null parsed values when asserting ok/err outcomes.
Made-with: Cursor
* add deterministic fixtures for remaining brittle route tests
Use explicit postgres fixtures for profile and admin standing routes and make pantheon search assertions data-aware so tests execute fully without relying on production-only records.
Made-with: Cursor
* format reporting standing fixture tests for ci
Apply Prettier formatting to new reporting standing fixture tests so static checks pass.
Made-with: Cursor
* make leaderboard search route tests data-tolerant in ci
Update leaderboard route tests to assert success for list queries while allowing search queries to return not-on-leaderboard errors when seeded CI data lacks matching memberships.
Made-with: Cursor
* fix profile and instance-standing test setup execution
Run authorized profile assertion inside a test case and split multi-statement fixture setup queries so pg prepared statements work in CI.
Made-with: Cursor
* set instance-standing fixture skull hashes to empty array
Populate skull_hashes with an empty bigint array in the fixture instance so route response schema validation matches expected array type.
Made-with: Cursor
* test: add DB fixtures and drop vacuous skips
Replace early returns and weak assertions with deterministic inserts
via a shared fixture pool, and align teammates/history/instances
tests with real instance_player rows so routes exercise real data.
Made-with: Cursor
* test: assert teammates payload and error codes
Made-with: Cursor
* test: extend review themes to leaderboards and service history
Add leaderboard pagination invariants, tighten standing/history
assertions with real fixture data, and replace vacuous length checks
across route and service leaderboard tests.
Made-with: Cursor
* fix(ci): repair leaderboard TS narrowing, PGCR gzip, instance_character
- Narrow LeaderboardData union before individual vs team membership asserts
- Use err-branch type guard for pantheon search fallback
- Store gzip-compressed minimal PGCR JSON for raw.pgcr fixtures
- Seed extended.instance_character so getInstanceExtended players[].characters is an array
Made-with: Cursor
* test: align history final-raid and feat list with CI seed
Made-with: Cursor1 parent 927af8a commit d81d182
50 files changed
Lines changed: 2179 additions & 635 deletions
File tree
- .github
- scripts
- workflows
- src
- integrations
- clickhouse
- postgres
- lib
- routes
- admin/reporting
- leaderboard
- individual
- team
- metrics
- player
- membershipId
- services
- atlas
- clans
- instance
- leaderboard
- manifest
- metrics
- player-instances
- reporting
- search
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 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 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
19 | 22 | | |
20 | 23 | | |
21 | 24 | | |
22 | 25 | | |
23 | 26 | | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
| 27 | + | |
| 28 | + | |
39 | 29 | | |
40 | 30 | | |
41 | 31 | | |
42 | 32 | | |
43 | 33 | | |
44 | 34 | | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
49 | 39 | | |
50 | | - | |
51 | | - | |
| 40 | + | |
| 41 | + | |
52 | 42 | | |
53 | 43 | | |
54 | 44 | | |
| |||
57 | 47 | | |
58 | 48 | | |
59 | 49 | | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
20 | 23 | | |
21 | 24 | | |
22 | 25 | | |
| |||
26 | 29 | | |
27 | 30 | | |
28 | 31 | | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | 32 | | |
39 | 33 | | |
40 | 34 | | |
41 | 35 | | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
| 36 | + | |
| 37 | + | |
48 | 38 | | |
49 | 39 | | |
50 | 40 | | |
51 | 41 | | |
52 | 42 | | |
53 | 43 | | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
58 | 48 | | |
59 | | - | |
60 | | - | |
| 49 | + | |
| 50 | + | |
61 | 51 | | |
62 | 52 | | |
63 | 53 | | |
64 | 54 | | |
65 | 55 | | |
66 | 56 | | |
67 | 57 | | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
2 | 3 | | |
3 | 4 | | |
4 | 5 | | |
| |||
58 | 59 | | |
59 | 60 | | |
60 | 61 | | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
75 | 82 | | |
76 | | - | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
| 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 | + | |
0 commit comments