Skip to content

Commit

Permalink
C2C-269: Add step to validate C2C OpenMRS config on PRs and pushes
Browse files Browse the repository at this point in the history
 #fix
  • Loading branch information
kdaud committed Dec 17, 2024
1 parent efd966c commit b00e0cd
Show file tree
Hide file tree
Showing 4 changed files with 65 additions and 3 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ jobs:
uses: mekomsolutions/shared-github-workflow/.github/workflows/maven-build-test.yml@main
with:
java-version: "8"
maven-args: "-P validator" # OMRS config validation
secrets:
NEXUS_USERNAME: ${{ secrets.NEXUS_USERNAME }}
NEXUS_PASSWORD: ${{ secrets.NEXUS_PASSWORD }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ Uuid,Void/Retire,Same as mappings,Fully specified name:en,Fully specified name:f
b3cdc446-c350-4503-9372-5d707641196b,,,Drug Ordered,Médicament,Drug Ordered,Médicament,,,Misc,Text,,,,,,,,,,
9083fd3e-19f3-460b-a2eb-9022c628c275,,,Quantity Prescribed,Quantité prescrite,Quantity Prescribed,Quantité prescrite,,,Misc,Numeric,,,TRUE,,,,,,,
8d835bc7-fdaf-4f21-83df-73c7c919cdbf,,,Drug Recommended Dose,Dose recommandée,Drug Recommended Dose,Dose recommandée,,,Misc,Numeric,,,TRUE,,,,,,,
994a3b2d-1aa8-4717-a7a9-8b7cf609a00f,,,Drug Order,Prescription de médicaments,Drug Order,Prescription de médicaments,,,Misc,N/A,,b3cdc446-c350-4503-9372-5d707641196b;f5e7648d-9dfb-4506-9602-000ab940a197;9083fd3e-19f3-460b-a2eb-9022c628c275;8d835bc7-fdaf-4f21-83df-73c7c919cdbf,,,,,,,,
994a3b2d-1aa8-4717-a7a9-8b7cf609a00f,,,Drug Order,Prescription de médicaments,Drug Order,Prescription de médicaments,,,Misc,N/A,,b3cdc446-c350-4503-9372-5d707641196b;9083fd3e-19f3-460b-a2eb-9022c628c275;8d835bc7-fdaf-4f21-83df-73c7c919cdbf,,,,,,,,
f5fb6b5b-1f77-4be9-bd6e-165612338318,,,Test Ordered,Test laboratoire,Test Ordered,Test laboratoire,,,Misc,Text,,,,,,,,,,
008f59ed-c964-4657-b89c-5b90d1d9a53e,,,Lab Test Order,Prescription de tests laboratoire,Lab Test Order,Prescription de tests laboratoire,,,Misc,N/A,,f5fb6b5b-1f77-4be9-bd6e-165612338318,,,,,,,,
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
Uuid,Void/Retire,Name,Description,_version:1
e4f9bb8e-8ac5-405f-9baf-21dc8de28a73,,N/A,"Visit type used to be assigned to legacy visits, imported from the historical database",
e4f9bb8e-8ac5-405f-9baf-21dc8de28a73,True,,,
e4f9bb8e-8ac5-405f-9baf-21dc8de28a73,,N/A,"Visit type used to be assigned to legacy visits, imported from the historical database",
62 changes: 62 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,68 @@
</plugins>
</build>

<profiles>
<profile>
<id>validator</id>
<build>
<plugins>
<!-- copy over merged/packaged OpenMRS config for validation at the integration-test phase -->
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>Copy OpenMRS Initializer configs for validation</id>
<phase>pre-integration-test</phase>
<configuration>
<target>
<copy todir="${project.build.directory}/validator/configuration">
<fileset
dir="${project.build.directory}/${project.artifactId}-${project.version}/openmrs_config">
<!-- Exclude RelationshipTypes-1.zip -->
<exclude name="**/metadatasharing/RelationshipTypes-1.zip"/>
<exclude name="**/patientidentifiertypes/voids.csv"/>
<exclude name="**/roles/roles.csv"/>
<exclude name="**/concepts/commons.csv"/>
<exclude name="**/concepts/disposition.csv"/>
<exclude name="**/concepts/drugs_concepts.csv"/>
<exclude name="**/concepts/lab_tests.csv"/>
<exclude name="**/concepts/openelis.csv"/>
<exclude name="**/concepts/anthropometric.csv"/>
<exclude name="**/bahmniforms/*"/>
</fileset>
</copy>
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- hooking the OpenMRS config validation to the integration-test phase -->
<plugin>
<groupId>org.openmrs.maven.plugins</groupId>
<artifactId>openmrs-packager-maven-plugin</artifactId>
<version>1.7.0</version>
<executions>
<execution>
<id>Validate OpenMRS Initializer configs</id>
<phase>integration-test</phase>
<goals>
<goal>validate-configurations</goal>
</goals>
<configuration>
<sourceDir>
${project.build.directory}/validator/configuration</sourceDir>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>

<repositories>
<repository>
<id>mks-nexus-public</id>
Expand Down

0 comments on commit b00e0cd

Please sign in to comment.