StaffCoder
GitHub Actions
8 modules · 24 challengesSign up
Module 6 of 8 · 3 challenges

GitHub Actions Containers, Services & Artifacts

Pin a job to a container image, reach a service database by its hostname, and hand work between jobs through uploaded artifacts and a dependency cache.
Finish every challenge, or complete the star challenge, to complete the module.

Challenges

3 challenges

Job Containers & Service Databases

Sign up to unlock
—No data yetmedium
About this challenge

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.

Solved in a browser IDE and graded by tests. Sign up to solve

Artifacts & Dependency Caching

Sign up to unlock
—No data yetmedium
About this challenge

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.

Solved in a browser IDE and graded by tests. Sign up to solve

Integration Test Stage

STAR
Solving it completes the module
—No data yetmedium
About this challenge

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.

Solved in a browser IDE and graded by tests. Sign up to solve

We use cookies that are necessary to run Staffcoder, and optional analytics cookies to see which pages get used. Analytics stays off unless you accept. Read our Cookie Policy.