Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Working #1878

Merged
merged 8 commits into from
Jun 20, 2024
Merged

Working #1878

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
84 changes: 82 additions & 2 deletions .github/workflows/node.working.js.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: OHRI CI - @esm and Docker Image
name: OHRI CI - @esm and Docker Image Working/QA

on:
push:
Expand All @@ -11,8 +11,88 @@ on:
types: [opened, synchronize]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '18'

- name: Cache dependencies
id: cache
uses: actions/cache@v3
with:
path: '**/node_modules'
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}

- name: Install dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: yarn install --immutable

- name: Run tests
run: yarn run test

- name: Run build
run: yarn turbo run build --color --concurrency=5 --api="http://127.0.0.1:9080" --token="${{ secrets.TURBO_SERVER_TOKEN }}" --team="${{ github.repository_owner }}"

- name: Upload build artifacts
uses: actions/upload-artifact@v3
with:
name: packages
path: |
packages/**/dist

qa:
runs-on: ubuntu-latest
needs: build

if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/working' }}

steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
registry-url: 'https://registry.npmjs.org'

- name: Cache dependencies
id: cache
uses: actions/cache@v3
with:
path: '**/node_modules'
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-

- name: Install dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: yarn install --immutable

- name: Version
run: yarn workspaces foreach --worktree --topological --exclude @ohri/openmrs-esm-ohri version "$(node -e "console.log(require('semver').inc(require('./package.json').version, 'patch'))")-qa.${{ github.run_number }}"

- name: Build
run: yarn turbo run build --color --concurrency=5

- name: qa
run: yarn config set npmAuthToken "${NODE_AUTH_TOKEN}" && yarn run ci:qa
env:
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}

- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: packages
path: |
packages/**/dist

docker_workingserver_frontend:
runs-on: ubuntu-latest
needs: qa

steps:
- name: Wait for 5 min - Let @esms reflect on NPM registry
Expand All @@ -37,7 +117,7 @@ jobs:
file: ./frontend/Dockerfile
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ secrets.DOCKERHUB_USERNAME }}/ohri-working-frontend:next,${{ secrets.DOCKERHUB_USERNAME }}/ohri-working-frontend:ci_${{ github.run_number }}
tags: ${{ secrets.DOCKERHUB_USERNAME }}/ohri-working-frontend:qa,${{ secrets.DOCKERHUB_USERNAME }}/ohri-working-frontend:ci_${{ github.run_number }}
cache-from: type=inline,ref=user/app:buildcache
cache-to: type=inline,ref=user/app:buildcache,mode=max

Expand Down
3 changes: 3 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,7 @@ changesetBaseRefs: [
"dev",
"origin/dev",
"upstream/dev",
"working",
"origin/working",
"upstream/working",
]
84 changes: 43 additions & 41 deletions frontend/spa-build-config.json
Original file line number Diff line number Diff line change
@@ -1,46 +1,48 @@
{
"frontendModules": {
"@openmrs/esm-devtools-app": "5.3.3-pre.1301",
"@openmrs/esm-implementer-tools-app": "5.3.3-pre.1301",
"@openmrs/esm-login-app": "5.3.3-pre.1301",
"@openmrs/esm-primary-navigation-app": "5.3.3-pre.1301",
"@openmrs/esm-home-app": "5.2.1-pre.305",
"@openmrs/esm-form-entry-app": "6.1.1-pre.3293",
"@openmrs/esm-generic-patient-widgets-app": "6.1.1-pre.3293",
"@openmrs/esm-patient-allergies-app": "6.1.1-pre.3293",
"@openmrs/esm-patient-appointments-app": "6.1.1-pre.3293",
"@openmrs/esm-patient-attachments-app": "6.1.1-pre.3293",
"@openmrs/esm-patient-banner-app": "6.1.1-pre.3293",
"@openmrs/esm-patient-chart-app": "6.1.1-pre.3293",
"@openmrs/esm-patient-conditions-app": "6.1.1-pre.3293",
"@openmrs/esm-patient-forms-app": "6.1.1-pre.3293",
"@openmrs/esm-patient-flags-app": "6.1.1-pre.3293",
"@openmrs/esm-patient-labs-app": "6.1.1-pre.3293",
"@openmrs/esm-patient-lists-app": "6.1.1-pre.3293",
"@openmrs/esm-patient-medications-app": "6.1.1-pre.3293",
"@openmrs/esm-patient-notes-app": "6.1.1-pre.3293",
"@openmrs/esm-patient-orders-app": "6.1.1-pre.3293",
"@openmrs/esm-patient-programs-app": "6.1.1-pre.3293",
"@openmrs/esm-patient-vitals-app": "6.1.1-pre.3293",
"@openmrs/esm-active-visits-app": "5.2.2-pre.2432",
"@openmrs/esm-appointments-app": "5.2.2-pre.2432",
"@openmrs/esm-service-queues-app": "5.2.2-pre.2432",
"@openmrs/esm-patient-list-management-app": "5.2.2-pre.2432",
"@openmrs/esm-patient-registration-app": "5.2.2-pre.2432",
"@openmrs/esm-patient-search-app": "5.2.2-pre.2432",
"@openmrs/esm-openconceptlab-app": "4.0.2-pre.88",
"@openmrs/esm-system-admin-app": "4.0.2-pre.88",
"@openmrs/esm-dispensing-app": "1.2.2-pre.256",
"@openmrs/esm-fast-data-entry-app": "1.0.1-pre.117",
"@openmrs/esm-cohort-builder-app": "3.0.1-pre.183",
"@openmrs/esm-form-builder-app": "2.2.2-pre.654",
"@ohri/openmrs-esm-ohri-core-app": "2.1.0-pre.3192",
"@ohri/openmrs-esm-ohri-hiv-app": "2.1.0-pre.3192",
"@ohri/openmrs-esm-ohri-covid-app": "2.1.0-pre.3192",
"@ohri/openmrs-esm-ohri-pmtct": "2.1.0-pre.3192",
"@ohri/openmrs-esm-ohri-tb-app": "2.1.0-pre.3192",
"@ohri/openmrs-esm-ohri-cervical-cancer-app": "2.1.0-pre.3192",
"@ohri/openmrs-esm-ohri-form-render-app": "2.1.0-pre.3192"
"@openmrs/esm-devtools-app": "next",
"@openmrs/esm-implementer-tools-app": "next",
"@openmrs/esm-login-app": "next",
"@openmrs/esm-primary-navigation-app": "next",
"@openmrs/esm-home-app": "next",
"@openmrs/esm-form-engine-app": "next",
"@openmrs/esm-generic-patient-widgets-app": "next",
"@openmrs/esm-patient-allergies-app": "next",
"@openmrs/esm-patient-attachments-app": "next",
"@openmrs/esm-patient-banner-app": "next",
"@ohri/esm-patient-chart-app": "next",
"@openmrs/esm-patient-conditions-app": "next",
"@openmrs/esm-patient-forms-app": "next",
"@openmrs/esm-patient-flags-app": "next",
"@openmrs/esm-patient-labs-app": "next",
"@openmrs/esm-patient-lists-app": "next",
"@openmrs/esm-patient-medications-app": "next",
"@openmrs/esm-patient-notes-app": "next",
"@openmrs/esm-patient-orders-app": "next",
"@openmrs/esm-patient-programs-app": "next",
"@openmrs/esm-patient-vitals-app": "next",
"@openmrs/esm-active-visits-app": "next",
"@openmrs/esm-appointments-app": "next",
"@openmrs/esm-service-queues-app": "next",
"@openmrs/esm-patient-list-management-app": "next",
"@openmrs/esm-patient-registration-app": "next",
"@openmrs/esm-patient-search-app": "next",
"@openmrs/esm-openconceptlab-app": "next",
"@openmrs/esm-system-admin-app": "next",
"@openmrs/esm-dispensing-app": "next",
"@openmrs/esm-fast-data-entry-app": "next",
"@openmrs/esm-cohort-builder-app": "next",
"@ohri/openmrs-esm-ohri-core-app": "qa",
"@ohri/openmrs-esm-ohri-hiv-app": "qa",
"@ohri/openmrs-esm-ohri-covid-app": "qa",
"@ohri/openmrs-esm-ohri-pmtct-app": "qa",
"@ohri/openmrs-esm-ohri-tb-app": "qa",
"@ohri/openmrs-esm-ohri-cervical-cancer-app": "qa",
"@ohri/openmrs-esm-ohri-form-render-app": "qa",
"@openmrs/esm-stock-management-app": "next",
"@openmrs/esm-billing-app": "next",
"@ohri/openmrs-esm-ohri-opd-app": "qa",
"@openmrs/esm-form-builder-app": "next"
},
"spaPath": "$SPA_PATH",
"apiUrl": "$API_URL",
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"verify": "turbo run lint && turbo run typescript && yarn test --coverage",
"ci:prepublish": "yarn workspaces foreach --all --topological --exclude @ohri/openmrs-esm-ohri npm publish --access public --tag next",
"ci:publish": "yarn workspaces foreach --all --topological --exclude @ohri/openmrs-esm-ohri npm publish --access public --tag latest",
"ci:qa": "yarn workspaces foreach --all --topological --exclude @ohri/openmrs-esm-ohri npm publish --access public --tag qa",
"release": "yarn workspaces foreach --all --topological version",
"coverage": "yarn test --coverage",
"badges": "yarn coverage && yarn jest-coverage-badges --output './badges' ",
Expand Down
2 changes: 1 addition & 1 deletion packages/esm-ohri-pmtct-app/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@ohri/openmrs-esm-ohri-pmtct",
"name": "@ohri/openmrs-esm-ohri-pmtct-app",
"version": "2.3.3",
"description": "PMTCT microfrontend for OpenMRS HIV Reference Implementation (OHRI)",
"browser": "dist/ohri-pmtct-app.js",
Expand Down
6 changes: 0 additions & 6 deletions packages/esm-tb-app/src/dashboard.meta.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,6 @@ export const tbClinicalViewDashboardMeta = {
isFolder: true,
title: 'Tuberculosis',
};
export const tbPreventionDashboardMeta = {
name: 'tb-prevention',
slot: 'tb-prevention-dashboard-slot',
config: { columns: 1, type: 'grid', programme: 'tpt', dashboardTitle: 'TB Prevention'},
title: 'TB Prevention',
};

export const tbPreventionDashboardMeta = {
name: 'tb-prevention',
Expand Down
4 changes: 2 additions & 2 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2869,9 +2869,9 @@ __metadata:
languageName: unknown
linkType: soft

"@ohri/openmrs-esm-ohri-pmtct@workspace:packages/esm-ohri-pmtct-app":
"@ohri/openmrs-esm-ohri-pmtct-app@workspace:packages/esm-ohri-pmtct-app":
version: 0.0.0-use.local
resolution: "@ohri/openmrs-esm-ohri-pmtct@workspace:packages/esm-ohri-pmtct-app"
resolution: "@ohri/openmrs-esm-ohri-pmtct-app@workspace:packages/esm-ohri-pmtct-app"
dependencies:
"@carbon/react": "npm:^1.13.0"
webpack: "npm:^5.88.2"
Expand Down
Loading