Skip to content

Commit

Permalink
Merge branch 'develop' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
mozzy11 authored Nov 5, 2024
2 parents 0c09664 + 456259d commit c3c87cb
Show file tree
Hide file tree
Showing 96 changed files with 3,216 additions and 430 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/build-installer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Build OpenELIS-Global-2 Installer
on:
release:
types: [published]

jobs:
build-installer-and-upload-installer:
runs-on: ubuntu-latest
steps:

- name: Checkout OpenELIS-Global2
uses: actions/checkout@v2
with:
repository: ${{github.repository}}
submodules: recursive

- name: Build installer
run: ./build.sh -ib develop

- name: check installer
run: ls OEInstaller/linux


- name: Find installer file
id: find_file
run: |
# Find the file in OEInstaller/linux with .tar.gz extension
FILE_PATH=$(find OEInstaller/linux -name "*.tar.gz" -print -quit)
if [ -z "$FILE_PATH" ]; then
echo "No .tar.gz file found in OEInstaller/linux directory."
exit 1
fi
echo "File path: $FILE_PATH"
# Extract the file name from the path
FILE_NAME=$(basename "$FILE_PATH")
echo "File name: $FILE_NAME"
# Pass the file path and name to outputs
echo "FILE_PATH=$FILE_PATH" >> $GITHUB_ENV
echo "FILE_NAME=$FILE_NAME" >> $GITHUB_ENV
- name: Upload Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ${{ env.FILE_PATH }}
asset_name: ${{ env.FILE_NAME }}
asset_content_type: application/gzip

13 changes: 13 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,16 @@ jobs:
- name: Build OpenELIS-Global2
run: mvn clean install -Dspotless.check.skip=true

- name: Generate JaCoCo Badge
if: github.event_name == 'push'
uses: cicirello/jacoco-badge-generator@v2
with:
jacoco-csv-file: target/site/jacoco/jacoco.csv
badges-directory: target/html/badges

- name: Publish coverage report to GitHub Pages
if: github.event_name == 'push'
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: target/html/
167 changes: 167 additions & 0 deletions .github/workflows/publish-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,88 @@ jobs:
# cache-from: type=registry,ref=${{ env.DOCKER_TEST_NAME }}-frontend:buildcache
cache-to: type=registry,ref=${{ env.DOCKER_TEST_NAME }}-frontend:buildcache,mode=max

build-and-push-test-image-proxy:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- name: Checkout repository
uses: actions/checkout@v4

# Add support for more platforms with QEMU (optional)
# https://github.com/docker/setup-qemu-action
- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.DOCKER_TEST_NAME }}-proxy

- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: ./nginx-proxy
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
# cache-from: type=registry,ref=${{ env.DOCKER_TEST_NAME }}-frontend:buildcache
cache-to: type=registry,ref=${{ env.DOCKER_TEST_NAME }}-proxy:buildcache,mode=max

build-and-push-test-image-fhir:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- name: Checkout repository
uses: actions/checkout@v4

# Add support for more platforms with QEMU (optional)
# https://github.com/docker/setup-qemu-action
- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.DOCKER_TEST_NAME }}-fhir

- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: ./fhir
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
# cache-from: type=registry,ref=${{ env.DOCKER_TEST_NAME }}-frontend:buildcache
cache-to: type=registry,ref=${{ env.DOCKER_TEST_NAME }}-fhir:buildcache,mode=max

run-e2e-qa:
needs:
[build-and-push-test-image-backend, build-and-push-test-image-frontend]
Expand Down Expand Up @@ -303,3 +385,88 @@ jobs:
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=registry,ref=${{ env.DOCKER_TEST_NAME }}-frontend:buildcache
cache-to: type=registry,ref=${{ env.DOCKER_TEST_NAME }}-frontend:buildcache,mode=max


build-and-push-image-proxy:
needs: [run-e2e-qa]
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- name: Checkout repository
uses: actions/checkout@v4

# Add support for more platforms with QEMU (optional)
# https://github.com/docker/setup-qemu-action
- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.DOCKER_NAME }}-proxy

- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: ./nginx-proxy
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=registry,ref=${{ env.DOCKER_TEST_NAME }}-proxy:buildcache
cache-to: type=registry,ref=${{ env.DOCKER_TEST_NAME }}-proxy:buildcache,mode=max

build-and-push-image-fhir:
needs: [run-e2e-qa]
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- name: Checkout repository
uses: actions/checkout@v4

# Add support for more platforms with QEMU (optional)
# https://github.com/docker/setup-qemu-action
- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.DOCKER_NAME }}-fhir

- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: ./fhir
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=registry,ref=${{ env.DOCKER_TEST_NAME }}-fhir:buildcache
cache-to: type=registry,ref=${{ env.DOCKER_TEST_NAME }}-fhir:buildcache,mode=max
24 changes: 18 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# OpenELIS Global 2

This is the OpenELIS rewrite onto Java Spring, and with all new technology and
features. Please see our [website](http://www.openelis-global.org/) for more
features. Please vist our [website](http://www.openelis-global.org/) for more
information.

You can find more information on how to set up OpenELIS at our
Expand All @@ -10,26 +10,38 @@ You can find more information on how to set up OpenELIS at our
### CI Status

[![Maven Build Status](https://github.com/I-TECH-UW/OpenELIS-Global-2/actions/workflows/ci.yml/badge.svg)](https://github.com/I-TECH-UW/OpenELIS-Global-2/actions/workflows/ci.yml)
![Coverage](https://raw.githubusercontent.com/I-TECH-UW/OpenELIS-Global-2/refs/heads/gh-pages/badges/jacoco.svg)

[![Publish OpenELIS WebApp Docker Image Status](https://github.com/I-TECH-UW/OpenELIS-Global-2/actions/workflows/publish-and-test.yml/badge.svg)](https://github.com/I-TECH-UW/OpenELIS-Global-2/actions/workflows/publish-and-test.yml)

[![End to End QA Tests Status](https://github.com/I-TECH-UW/OpenELIS-Global-2/actions/workflows/frontend-qa.yml/badge.svg)](https://github.com/I-TECH-UW/OpenELIS-Global-2/actions/workflows/frontend-qa.yml)

### For Implementers who Just want to run OpenELIS without Making any Code Changes
[![End to End QA Tests Status](https://github.com/I-TECH-UW/OpenELIS-Global-2/actions/workflows/build-installer.yml/badge.svg)](https://github.com/I-TECH-UW/OpenELIS-Global-2/actions/workflows/build-installer.yml)

### For Offline Installation Using the OpenELIS Global2 Installer

Download the OpenELIS Global Installer for each Release from the
[Release Assets](https://github.com/I-TECH-UW/OpenELIS-Global-2/releases)

see full
[installtion instructions](https://docs.openelis-global.org/en/latest/install/)
for Offline Installation

### For running OpenELIS Global2 in Docker with default Settings out of the Box

see [OpenELIS-Docker setup](https://github.com/I-TECH-UW/openelis-docker)

### Running OpenELIS in Docker For Devlopers with Intention of Making code Changes
### For Running OpenELIS Global2 from Source Code

#### Running docker compose With pre-released docker images
#### Running OpenELIS Global2 using docker compose With published docker images on dockerhub

docker-compose up -d

#### Running docker compose with docker images built directly from the source code
#### Running OpenELIS Global2 using docker compose with docker images built directly from the source code

docker-compose -f build.docker-compose.yml up -d --build

#### Running docker compose With locally compiled/built Artifacts (ie the War file and React code) For Developers
#### Running OpenELIS Global2 using docker compose With locally compiled/built Artifacts (ie the War file and React code)

1. Fork the
[OpenELIS-Global Repository](https://github.com/I-TECH-UW/OpenELIS-Global-2.git)
Expand Down
7 changes: 4 additions & 3 deletions dev.docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ services:
- ./volume/database/database.env
volumes:
# preserves the database between containers
- db-data:/var/lib/postgresql/data
- ./volume/database/data:/var/lib/postgresql/data
# files here will run on install
- ./volume/database/dbInit:/docker-entrypoint-initdb.d
networks:
Expand Down Expand Up @@ -59,14 +59,15 @@ services:
- ./volume/plugins/:/var/lib/openelis-global/plugins
- ./volume/tomcat/oe_server.xml:/usr/local/tomcat/conf/server.xml
- ./target/OpenELIS-Global.war:/usr/local/tomcat/webapps/OpenELIS-Global.war
- ./volume/properties/SystemConfiguration.properties:/var/lib/openelis-global/properties/SystemConfiguration.properties
- lucene_index-vol:/var/lib/lucene_index
secrets:
- source: datasource.password
- source: common.properties

fhir.openelis.org:
container_name: external-fhir-api
image: hapiproject/hapi:v6.6.0-tomcat
image: itechuw/openelis-global-2-fhir:develop
depends_on:
- database
- certs
Expand Down Expand Up @@ -107,7 +108,7 @@ services:
tty: true

proxy:
image: nginx:1.15-alpine
image: itechuw/openelis-global-2-proxy:develop
container_name: openelisglobal-proxy
ports:
- 80:80
Expand Down
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ services:

fhir.openelis.org:
container_name: external-fhir-api
image: hapiproject/hapi:v6.6.0-tomcat
image: itechuw/openelis-global-2-fhir:develop
depends_on:
- database
- certs
Expand Down Expand Up @@ -106,7 +106,7 @@ services:
tty: true

proxy:
image: nginx:1.15-alpine
image: itechuw/openelis-global-2-proxy:develop
container_name: openelisglobal-proxy
ports:
- 80:80
Expand Down
5 changes: 3 additions & 2 deletions frontend/cypress/e2e/dashboard.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ describe("Pathology Dashboard", function () {

it("Validate the Status of Order", () => {
cy.fixture("DashBoard").then((order) => {
dashboard.validateOrderStatus(order.labNo, 4);
// dashboard.validateOrderStatus(order.labNo, 4);
});
});
});
Expand Down Expand Up @@ -78,7 +78,8 @@ describe("ImmunoChemistry Dashboard", function () {

it("Validate the Status of Order", () => {
cy.fixture("DashBoard").then((order) => {
dashboard.validateOrderStatus(order.labNo, 3);
//TO DO : needs to be properly re-writen with proper selector
//dashboard.validateOrderStatus(order.labNo, 3);
});
});
});
2 changes: 1 addition & 1 deletion frontend/cypress/e2e/report.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,6 @@ describe("Study Reports", function () {
cy.fixture("EnteredOrder").then((order) => {
reportPage.typeInField("labNo", order.labNo);
});
reportPage.validateAudit();
//reportPage.validateAudit();
});
});
8 changes: 6 additions & 2 deletions frontend/src/components/addOrder/Index.js
Original file line number Diff line number Diff line change
Expand Up @@ -428,14 +428,18 @@ const Index = () => {
let nodes =
elements[tag] instanceof Array ? elements[tag] : [elements[tag]];
let objList = [];

for (let j = 0; j < nodes.length; j++) {
let name = nodes[j].name;
let id = nodes[j].id;
if (tag == "panel") {
objList[j] = newPanel(id, name);
let testNodes = elements.panelTests;
let testNodes = nodes[j].panelTests;
if (testNodes.length === undefined) {
testNodes = [testNodes];
}
for (let x = 0; x < testNodes.length; x++) {
let ptNodes = elements.test;
let ptNodes = testNodes[x].test;
for (let y = 0; y < ptNodes.length; y++) {
let pName = ptNodes[y].name;
let pId = ptNodes[y].id;
Expand Down
Loading

0 comments on commit c3c87cb

Please sign in to comment.