Skip to content

feat(workflows): add docker container testing workflow#89

Closed
srmanda-cs wants to merge 1 commit intouncch-rdmc:developfrom
srmanda-cs:msreddy/container-testing-workflow
Closed

feat(workflows): add docker container testing workflow#89
srmanda-cs wants to merge 1 commit intouncch-rdmc:developfrom
srmanda-cs:msreddy/container-testing-workflow

Conversation

@srmanda-cs
Copy link

What this PR does / why we need it:

Which issue(s) this PR closes:

  • Closes #

Special notes for your reviewer:

Suggestions on how to test this:

Does this PR introduce a user interface change? If mockups are available, please link/include them here:

Is there a release notes update needed for this change?:

Additional documentation:

Copilot AI review requested due to automatic review settings March 3, 2026 19:13
@srmanda-cs srmanda-cs closed this Mar 3, 2026
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new GitHub Actions workflow intended to build/start the Docker Compose dev stack on develop pushes/PRs and perform a basic readiness check against the Dataverse API.

Changes:

  • Introduces .github/workflows/container_testing_run.yml to run Docker Compose on CI for develop.
  • Adds an HTTP readiness loop against http://localhost:8080/api/info/version.
  • Adds Python/Chrome setup steps (though no tests are executed yet).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

set -euo pipefail
sudo systemctl stop docker || true
sudo rm -rf /var/lib/docker
sudo rm -rf /var/lib/containerd
Copy link

Copilot AI Mar 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Scrub Docker state stops the Docker daemon and wipes Docker/containerd state, but the workflow never starts Docker again. On GitHub-hosted runners this will usually cause the later docker version / docker compose steps to fail; add a systemctl start docker (and wait for readiness) or avoid stopping Docker in the first place.

Suggested change
sudo rm -rf /var/lib/containerd
sudo rm -rf /var/lib/containerd
sudo systemctl start docker
# Wait for Docker daemon to become ready
for i in {1..30}; do
if docker info >/dev/null 2>&1; then
break
fi
sleep 1
done

Copilot uses AI. Check for mistakes.
run: |
set -euo pipefail
python -m pip install --upgrade pip
pip install -r tests/requirements.txt
Copy link

Copilot AI Mar 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The workflow installs Python deps from tests/requirements.txt, but that file is not present in the repo, so this step will fail. Update this to an existing dependency source (or add the missing file) before enabling the workflow.

Suggested change
pip install -r tests/requirements.txt
pip install -r requirements.txt

Copilot uses AI. Check for mistakes.
run: |
google-chrome --version

# ---------------------------
Copy link

Copilot AI Mar 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After setting up Python and verifying Chrome, there is no step that actually runs any container/integration/UI tests (the workflow proceeds to shutdown). Add an explicit test execution step here (or remove the Python/Chrome setup if the workflow is only intended as a container smoke-start check).

Suggested change
# ---------------------------
# ---------------------------
# RUN CONTAINER/UI TESTS
# ---------------------------
- name: Run container/UI tests
run: |
set -euo pipefail
pytest -v
# ---------------------------

Copilot uses AI. Check for mistakes.
- name: Start containers
run: |
set -euo pipefail
docker compose -f docker-compose-dev.yml up -d
Copy link

Copilot AI Mar 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

docker-compose-dev.yml is a dev-focused compose file and bind-mounts ./target/dataverse into the container. This workflow never builds/populates ./target/dataverse, so on CI the mount will be empty and will override whatever is in the image at that path, likely preventing the app from deploying and making the readiness check fail. Use a CI-friendly compose file (e.g., without the dev bind mounts) or add the build step that produces the expected artifacts.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants