If client is started ART in the facility -'Reason why ART not initiat… #579
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Node.js CI | |
on: | |
push: | |
branches: [master, develop] | |
pull_request: | |
branches: [master, develop] | |
release: | |
types: | |
- created | |
env: | |
ESM_NAME: "@icap-ethiopia/esm-ethiohri-app" | |
JS_NAME: "openmrs-esm-ethiohri-app.js" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Use Node.js | |
uses: actions/setup-node@v1 | |
with: | |
node-version: "18" | |
- run: yarn | |
- run: yarn lint | |
- run: yarn coverage | |
- run: yarn typescript | |
- run: yarn build | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@v2 | |
with: | |
name: dist | |
path: | | |
dist | |
pre_release: | |
runs-on: ubuntu-latest | |
needs: build | |
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/develop'}} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Download Artifacts | |
uses: actions/download-artifact@v2 | |
- name: Use Node.js | |
uses: actions/setup-node@v1 | |
with: | |
node-version: "18" | |
registry-url: "https://registry.npmjs.org" | |
- run: yarn | |
- run: sed -i -e "s/\(\"version\":\\s\+\"\([0-9]\+\.\?\)\+\)/\1-pre.${{ github.run_number }}/" 'package.json' | |
- run: yarn config set npmAuthToken "${ICAP_ACCESS_TOKEN}" && yarn cipublish --access public --tag next --no-git-tag-version | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.ICAP_ACCESS_TOKEN }} | |
release: | |
runs-on: ubuntu-latest | |
needs: build | |
# if: ${{ github.event_name == 'release'}} | |
if: ${{ github.event_name == 'pull_request' && github.base_ref == 'master'}} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Download Artifacts | |
uses: actions/download-artifact@v2 | |
- name: Use Node.js | |
uses: actions/setup-node@v1 | |
with: | |
node-version: "18" | |
registry-url: 'https://registry.npmjs.org' | |
- run: yarn | |
- run: sed -i -e "s/\(\"version\":\\s\+\"\([0-9]\+\.\?\)\+\)/\1-release-pre.${{ github.run_number }}/" 'package.json' | |
- run: yarn config set npmAuthToken "${ICAP_ACCESS_TOKEN}" && yarn cipublish --access public --tag latest --no-git-tag-version | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.ICAP_ACCESS_TOKEN }} | |
dev: | |
runs-on: ethiohri-self-hosted | |
needs: pre_release | |
if: ${{ github.ref == 'refs/heads/develop' }} | |
steps: | |
- name: Download Artifacts | |
uses: actions/download-artifact@v3 | |
- name: Compute Timestamp | |
run: echo "TIMESTAMP=$(date +'%Y-%m-%d')" >> $GITHUB_ENV | |
- name: Run the Update MicroFronEnd Script on dev server | |
run: cd /usr/share/tomcat/frontendmodules/ && /bin/bash update_frontend_modules.sh | |
demo: | |
runs-on: ubuntu-latest | |
needs: release | |
if: ${{ github.event_name == 'pull_request' && github.base_ref == 'master'}} | |
steps: | |
- name: Download Artifacts | |
uses: actions/download-artifact@v3 | |
- name: Compute Timestamp | |
run: echo "TIMESTAMP=$(date +'%Y-%m-%d')" >> $GITHUB_ENV | |
- uses: garygrossgarten/github-action-ssh@release | |
name: Run the Update MicroFronEnd Script on Demo server | |
with: | |
command: cd /usr/share/tomcat7/frontendmodules/ && /bin/bash update_frontend_modules.sh | |
host: ${{ secrets.ETHIOHRI_DEMO_HOST }} | |
username: ${{ secrets.ETHIOHRI_DEMO_USER }} | |
privateKey: ${{ secrets.ETHIOHRI_DEMO_PRIVATE_KEY}} |