Skip to content
Merged
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
64 changes: 19 additions & 45 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,64 +1,38 @@
# This is a basic workflow to help you get started with Actions
name: Build, Test & Publish

name: CI

# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [ main ]
pull_request:
branches: [ main ]
release:
types: [ created ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
env:
RELEASE_USERNAME: ${{ github.actor }}
RELEASE_TOKEN: ${{ secrets.PERSONAL_TOKEN }}

steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- uses: actions/checkout@v6

- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 8.0.232
- name: Set up Maven
uses: stCarolas/setup-maven@v4
with:
maven-version: 3.6.3
- name: Cache Maven packages
uses: actions/cache@v2
- name: Set up JDK 8
uses: actions/setup-java@v5.2.0
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- uses: s4u/maven-settings-action@v2.2.0
with:
servers: |
[{
"id": "github-packages",
"username": "${{ secrets.RELEASE_USERNAME }}",
"password": "${{ secrets.RELEASE_TOKEN }}"
}]
properties: |
[
{ "maven.wagon.http.ssl.insecure": "true" },
{ "maven.wagon.http.ssl.allowall": "true" },
{ "maven.wagon.http.ssl.ignore.validity.dates": "true"}
]
githubServer: false
- name: Build with Maven
run: mvn -P 'github-packages' install
java-version: '8'
distribution: zulu
cache: maven
server-id: github-packages
server-username: RELEASE_USERNAME
server-password: RELEASE_TOKEN

- name: Build and test
run: mvn -B -P github-packages install

- name: Publish package
run: mvn -P github-packages -DskipTests -Dfindbugs.skip=true -Dpmd.skip=true -Dcpd.skip=true -B deploy
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
if: github.event_name == 'release' && github.event.action == 'created'
run: mvn -B -P github-packages -DskipTests -Dfindbugs.skip=true -Dpmd.skip=true -Dcpd.skip=true deploy
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
import org.openmrs.api.PersonService;
import org.openmrs.api.context.Context;
import org.openmrs.api.impl.BaseOpenmrsService;
import org.openmrs.module.santedb.mpiclient.aop.PatientSynchronizationAdvice;
import org.openmrs.event.Event;
import org.openmrs.event.EventMessage;
import org.openmrs.module.idgen.IdentifierSource;
Expand Down Expand Up @@ -716,7 +717,12 @@ private Patient createImportedMpiPatient(Patient mpiPatient) {
mpiPatient.addIdentifier(localId);
}

return patientService.savePatient(mpiPatient);
PatientSynchronizationAdvice.SUPPRESS.set(true);
try {
return patientService.savePatient(mpiPatient);
} finally {
PatientSynchronizationAdvice.SUPPRESS.set(false);
}
}

private boolean isBiometricEngineEnabled() {
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
<namephoneticsVersion>1.4</namephoneticsVersion>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<xdsSenderVersion>2.2.1</xdsSenderVersion>
<mpiClientVersion>1.1.0</mpiClientVersion>
<mpiClientVersion>1.1.8</mpiClientVersion>
<apacheHttpCoreVersion>4.4.9</apacheHttpCoreVersion>
<apacheHttpClientVersion>4.5</apacheHttpClientVersion>
<jodaTimeVersion>2.2</jodaTimeVersion>
Expand Down
Loading