Use a service container for integration or cache tests.

Section: Services and operational patterns

Start a Redis service for tests

yaml
yaml
services:
  redis:
    image: redis:7
    ports:
      - 6379:6379
Explanation

Service containers provide disposable dependencies within a single workflow run.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Services and operational patterns
Label-based runner targeting
Match jobs to specialized self-hosted infrastructure.
OpenIn sheetyamlsame section
Inspect the workspace path
Print the checkout path on the runner.
OpenIn sheetbashsame section
Target a self-hosted runner
Run on infrastructure you manage.
Run the job inside a container
Use a container image as the job runtime.