Skip to content

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

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#88
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 stand up the Docker-based dev stack and perform container-level validation on pushes and PRs targeting develop.

Changes:

  • Introduces .github/workflows/container_testing_run.yml triggered on push/pull_request to develop (with docs-only path ignores).
  • Builds/starts the docker-compose-dev.yml stack and waits for the Dataverse API readiness endpoint.
  • Sets up Python and checks Chrome availability, then tears down containers and prunes Docker state.

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

Comment on lines +46 to +57
- name: Scrub Docker state
run: |
set -euo pipefail
sudo systemctl stop docker || true
sudo rm -rf /var/lib/docker
sudo rm -rf /var/lib/containerd

# Ubuntu runner already has Docker installed.
- name: Verify Docker
run: |
set -euo pipefail
docker 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.

The workflow stops the Docker daemon and deletes /var/lib/docker//var/lib/containerd, but it never starts Docker again. As a result, docker version (and later docker compose ...) will fail with "Cannot connect to the Docker daemon" on most runners. Start the Docker service again (and optionally wait until it’s active) before running any Docker commands, or remove the stop/wipe step if it’s not required.

Copilot uses AI. Check for mistakes.
Comment on lines +124 to +125
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.

pip install -r tests/requirements.txt will fail because tests/requirements.txt does not exist in the repository. Either add this requirements file (and keep it in sync with the Python/Selenium tests), or update the workflow to install dependencies from the location the project actually uses (e.g., a pinned requirements file or pyproject.toml).

Suggested change
pip install -r tests/requirements.txt
if [ -f tests/requirements.txt ]; then
echo "Installing test dependencies from tests/requirements.txt"
pip install -r tests/requirements.txt
elif [ -f requirements.txt ]; then
echo "tests/requirements.txt not found; installing from root requirements.txt"
pip install -r requirements.txt
elif [ -f pyproject.toml ]; then
echo "No requirements file found; installing project from pyproject.toml"
pip install .
else
echo "Error: No dependency definition found (tests/requirements.txt, requirements.txt, or pyproject.toml)." >&2
exit 1
fi

Copilot uses AI. Check for mistakes.
- name: Verify Chrome
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.

The job is named container-test and sets up Python/Selenium, but it never actually runs any tests after bringing the compose stack up (it only verifies Chrome and then tears everything down). Add an explicit test execution step (e.g., run the existing Python unittest suite, or whichever container/API checks this workflow is meant to validate) so the workflow provides real signal.

Suggested change
- name: Run Selenium tests
run: |
set -euo pipefail
python -m unittest discover -s tests -p "test_*.py"

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