Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 14 additions & 10 deletions .github/README.md
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -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
Expand All @@ -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
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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-*/**'

Expand Down
5 changes: 4 additions & 1 deletion docker/openemr/compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading