feat: update php unit test workflow to run in docker #71
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This change adds additional steps to support running php tests inside of a docker container
Jira Issue: https://revolutionparts.atlassian.net/browse/DEVX-700
Background
Working through changes in the file-scan-daemon, I needed to run tests inside of a docker container. In order to do THAT, I needed a way to run health checks and wait for a docker container to become ready.
Input Changes:
run_docker
- turn on to run tests inside of a docker containerhealth_check_command
- specific to each application, command to run to determine whether the container is ready (example)health_check_timeout
- how many seconds to wait for the container to be ready (defaults to 5 mins)Workflow Changes:
3 new workflow steps, all gated behind the
run_docker
flag. Most notably, the wait command, which loops through and checks to see whether or not the container is ready to run tests.Testing Information
Battle-Tested this over on the file-scan-daemon repo, working off a copy that I'm now moving back here.