
Move an integration suite off the bare runner and into a pinned job container with a real cache database alongside it as a service, declared with health-check options so the suite's very first query succeeds without a sleep or a retry. The suite is reached only at the service hostname, not the job's loopback address, and one grading run points it at a database that does not exist to prove it fails at connection instead of passing on nothing.
Stop the deploy job rebuilding what the build job already produced, and stop every run reinstalling unchanged dependencies: hand the bundle over as an uploaded artifact that excludes build metadata, download it into the consuming job's input path, and cache dependencies on a key combining the runner OS with the lockfile hash plus ordered fallbacks. The bundle's bytes derive from a per-grade token and are read back from the artifact server, and one run withholds the bundle to prove the consumer depends on the hand-over rather than a rebuild.
Assemble the whole stage: a build job that caches dependencies and uploads the bundle as an artifact, an integration job in a pinned container with a health-checked database service that tests the exact bundle bytes it was handed and publishes its report, and a job outside the stage proving the database is private to it. The bundle's bytes come from a per-grade token and are read from the artifact server, the cache is graded across two runs as a miss then a hit, and separate runs take away the database and withhold the bundle.