diff --git a/.github/README.md b/.github/README.md index 8a318bbb..ab94e567 100644 --- a/.github/README.md +++ b/.github/README.md @@ -1,10 +1,14 @@ # OpenEMR Docker Testing -## Workflow: Production Docker Test (test-prod.yml) +## Unified Docker Test Workflow -The `test-prod.yml` workflow verifies that the production OpenEMR Docker images can be built correctly and function with a database connection. These images have the OpenEMR code embedded within them and are identified by version numbers (e.g., 7.0.4). +The Docker test workflow combines both production and flex image testing into a single workflow file. -The workflow performs the following steps: +### Production Docker Tests + +This part of the workflow verifies that the production OpenEMR Docker images can be built correctly and function with a database connection. These images have the OpenEMR code embedded within them and are identified by version numbers (e.g., 7.0.4). + +The workflow performs the following steps for production images: 1. Builds OpenEMR Docker images defined in docker/openemr for numbered versions (e.g., 6.1.0, 7.0.4) 2. Sets up a test environment using Docker Compose with: @@ -14,17 +18,17 @@ The workflow performs the following steps: 4. Runs the OpenEMR installation process 5. Executes multiple test suites including unit, fixtures, services, validators, and controllers tests -### Triggers for Production Tests +#### Triggers for Production Tests -The workflow runs automatically when: +The production tests run automatically when: - Files in the `docker/openemr/[0-9]*.[0-9]*.[0-9]/**` directory are changed on the main branch - A pull request targeting the main branch changes files in the numbered version directories -## Workflow: Flex Docker Test (test-flex.yml) +### Flex Docker Tests -The `test-flex.yml` workflow tests the development-oriented "flex" Docker images. Unlike production images, flex builds don't embed the OpenEMR code within the image - they're designed for development purposes where the code is mounted separately. +This part of the workflow tests the development-oriented "flex" Docker images. Unlike production images, flex builds don't embed the OpenEMR code within the image - they're designed for development purposes where the code is mounted separately. -The workflow performs the following steps: +The workflow performs the following steps for flex images: 1. Checks out both the openemr-devops repository and the OpenEMR code repository 2. Builds the flex Docker images defined in docker/openemr @@ -33,8 +37,8 @@ The workflow performs the following steps: - OpenEMR container with mounted code 4. Verifies that the web server is responding correctly -### Triggers for Flex Tests +#### Triggers for Flex Tests -The workflow runs automatically when: +The flex tests run automatically when: - Files in the `docker/openemr/**` directory are changed on the main branch - A pull request targeting the main branch changes files in the docker/openemr directory diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 516f91d4..6bd6a9c1 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -5,14 +5,14 @@ on: branches: - master paths: - - '.github/workflows/test-prod.yml' + - '.github/workflows/test.yml' - 'docker/openemr/[0-9]*.[0-9]*.[0-9]/**' - 'docker/openemr/flex-*/**' pull_request: branches: - master paths: - - '.github/workflows/test-prod.yml' + - '.github/workflows/test.yml' - 'docker/openemr/[0-9]*.[0-9]*.[0-9]/**' - 'docker/openemr/flex-*/**' diff --git a/docker/openemr/compose.yml b/docker/openemr/compose.yml index 923b436a..d55d13f8 100644 --- a/docker/openemr/compose.yml +++ b/docker/openemr/compose.yml @@ -28,8 +28,11 @@ services: depends_on: mysql: condition: service_healthy + entrypoint: + - /bin/sh + - -x environment: - MANUAL_SETUP: 'yes' + MANUAL_SETUP: 'no' MYSQL_HOST: mysql MYSQL_PASS: openemr MYSQL_ROOT_PASS: root