Skip to content

Add Docker smoke test to Docker Build Check workflow#105

Open
rroy676 wants to merge 1 commit into
mainfrom
codex/add-docker-smoke-test-workflow
Open

Add Docker smoke test to Docker Build Check workflow#105
rroy676 wants to merge 1 commit into
mainfrom
codex/add-docker-smoke-test-workflow

Conversation

@rroy676

@rroy676 rroy676 commented Jun 30, 2026

Copy link
Copy Markdown
Owner

Motivation

  • Add a CI-level smoke test that verifies the built Docker image actually starts and the HTTP API responds, so pull requests fail when the image is non-functional.
  • Run the image locally in the runner (no push) and validate runtime behavior by calling the health endpoint /api/health.

Description

  • Update the existing workflow to build the image tagged stationarr:smoke-test with push: false, load: true, and the build arg APP_VERSION=smoke-test so the image is local-only and versioned for testing.
  • Add a step that runs the image as a container named stationarr-smoke-test with docker run -d --name stationarr-smoke-test -p 3000:3000 stationarr:smoke-test and retries curl against /api/health for up to 30 seconds.
  • Fail the job unless the health endpoint response contains "ok":true, print the health response to logs, dump container logs on timeout/failure, and always stop/remove the test container with docker rm -f stationarr-smoke-test in an if: always() cleanup step.

Testing

  • Parsed the modified workflow with ruby -e "require 'yaml'; YAML.load_file('.github/workflows/docker-build-check.yml'); puts 'YAML OK'", which succeeded.
  • Ran git diff --check to validate whitespace/format issues, which reported no problems.
  • Attempted a local docker build --build-arg APP_VERSION=smoke-test -t stationarr:smoke-test . but the Docker CLI is not available in this environment, so a local image build was not executed here (the smoke test will run in CI where Docker is available).

Codex Task

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant