From b00e0cde917e2c96ac05c4554be968dfadd57f5b Mon Sep 17 00:00:00 2001 From: kdaud Date: Wed, 20 Nov 2024 12:19:16 +0300 Subject: [PATCH] C2C-269: Add step to validate C2C OpenMRS config on PRs and pushes #fix --- .github/workflows/ci.yml | 1 + .../concepts/data_migration_concepts.csv | 2 +- .../visittypes/data_migration_visit_types.csv | 3 +- pom.xml | 62 +++++++++++++++++++ 4 files changed, 65 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 912bf64..dd27555 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 }} diff --git a/configs/openmrs/initializer/concepts/data_migration_concepts.csv b/configs/openmrs/initializer/concepts/data_migration_concepts.csv index 05bb30f..1b5d5aa 100644 --- a/configs/openmrs/initializer/concepts/data_migration_concepts.csv +++ b/configs/openmrs/initializer/concepts/data_migration_concepts.csv @@ -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,,,,,,,, diff --git a/configs/openmrs/initializer/visittypes/data_migration_visit_types.csv b/configs/openmrs/initializer/visittypes/data_migration_visit_types.csv index 21fad62..0ea8af7 100644 --- a/configs/openmrs/initializer/visittypes/data_migration_visit_types.csv +++ b/configs/openmrs/initializer/visittypes/data_migration_visit_types.csv @@ -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,,, \ No newline at end of file +e4f9bb8e-8ac5-405f-9baf-21dc8de28a73,,N/A,"Visit type used to be assigned to legacy visits, imported from the historical database", \ No newline at end of file diff --git a/pom.xml b/pom.xml index c0ad047..d710ba1 100644 --- a/pom.xml +++ b/pom.xml @@ -78,6 +78,68 @@ + + + validator + + + + + maven-antrun-plugin + + + Copy OpenMRS Initializer configs for validation + pre-integration-test + + + + + + + + + + + + + + + + + + + + + run + + + + + + + org.openmrs.maven.plugins + openmrs-packager-maven-plugin + 1.7.0 + + + Validate OpenMRS Initializer configs + integration-test + + validate-configurations + + + + ${project.build.directory}/validator/configuration + + + + + + + + + mks-nexus-public