generated from openmrs/openmrs-esm-template-app
-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(chore) Prepare CI and refactor to match new nomenclature
- Loading branch information
1 parent
a1d2bd6
commit 6b66b02
Showing
13 changed files
with
101 additions
and
186 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
name: Node.js CI | ||
name: UgandaEMR CI | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
|
@@ -10,22 +11,45 @@ on: | |
- created | ||
|
||
env: | ||
ESM_NAME: "@openmrs/esm-template-app" | ||
JS_NAME: "openmrs-esm-template-app.js" | ||
ESM_NAME: "@ugandaemr/esm-stock-management-app" | ||
JS_NAME: "esm-ugandaemr-stock-management-app.js" | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
env: | ||
TURBO_API: 'http://127.0.0.1:9080' | ||
TURBO_TOKEN: ${{ secrets.TURBO_SERVER_TOKEN }} | ||
TURBO_TEAM: ${{ github.repository_owner }} | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Use Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: "18.x" | ||
- run: yarn install --immutable | ||
registry-url: "https://registry.npmjs.org" | ||
|
||
- name: Cache dependencies | ||
id: cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: "**/node_modules" | ||
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }} | ||
|
||
- name: Install dependencies | ||
if: steps.cache.outputs.cache-hit != 'true' | ||
run: yarn install --immutable | ||
|
||
- name: Setup local cache server for Turborepo | ||
uses: felixmosh/turborepo-gh-artifacts@v2 | ||
with: | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
server-token: ${{ secrets.TURBO_SERVER_TOKEN }} | ||
|
||
- run: yarn verify | ||
- run: yarn build | ||
- run: yarn turbo build --color --concurrency=5 | ||
|
||
- name: Upload Artifacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
|
@@ -41,29 +65,54 @@ jobs: | |
if: ${{ github.event_name == 'push' }} | ||
|
||
steps: | ||
- run: echo "Uncomment the lines below and delete this one." | ||
# - uses: actions/checkout@v2 | ||
# - name: Download Artifacts | ||
# uses: actions/download-artifact@v3 | ||
# - name: Use Node.js | ||
# uses: actions/setup-node@v3 | ||
# with: | ||
# node-version: "18.x" | ||
# registry-url: "https://registry.npmjs.org" | ||
# - run: yarn install --immutable | ||
# - run: yarn version "$(node -e "console.log(require('semver').inc(require('./package.json').version, 'patch'))")-pre.${{ github.run_number }}" | ||
# - run: yarn build | ||
# - run: git config user.email "[email protected]" && git config user.name "OpenMRS CI" | ||
# - run: git add . && git commit -m "Prerelease version" --no-verify | ||
# - run: yarn config set npmAuthToken "${NODE_AUTH_TOKEN}" && yarn npm publish --access public --tag next | ||
# env: | ||
# NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} | ||
# - name: Upload Artifacts | ||
# uses: actions/upload-artifact@v3 | ||
# with: | ||
# name: dist | ||
# path: | | ||
# dist | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Download Artifacts | ||
uses: actions/download-artifact@v3 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: "18.x" | ||
registry-url: "https://registry.npmjs.org" | ||
|
||
- name: Cache dependencies | ||
id: cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: "**/node_modules" | ||
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }} | ||
|
||
- name: Install dependencies | ||
if: steps.cache.outputs.cache-hit != 'true' | ||
run: yarn install --immutable | ||
|
||
- name: Setup local cache server for Turborepo | ||
uses: felixmosh/turborepo-gh-artifacts@v2 | ||
with: | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
server-token: ${{ secrets.TURBO_SERVER_TOKEN }} | ||
|
||
- name: Version | ||
run: yarn version "$(node -e "console.log(require('semver').inc(require('./package.json').version, 'patch'))")-pre.${{ github.run_number }}" | ||
|
||
- name: Build | ||
run: yarn turbo build --color --concurrency=5 | ||
|
||
- run: git config user.email "<>" && git config user.name "UgandaEMR CI" | ||
- run: git add . && git commit -m "Prerelease version" --no-verify | ||
|
||
- name: Pre-release | ||
run: yarn config set npmAuthToken "${NODE_AUTH_TOKEN}" && yarn npm publish --access public --tag next | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} | ||
|
||
- name: Upload Artifacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: dist | ||
path: | | ||
dist | ||
release: | ||
runs-on: ubuntu-latest | ||
|
@@ -80,24 +129,20 @@ jobs: | |
uses: actions/setup-node@v3 | ||
with: | ||
node-version: "18.x" | ||
registry-url: 'https://registry.npmjs.org' | ||
- run: yarn install --immutable | ||
- run: yarn config set npmAuthToken "${NODE_AUTH_TOKEN}" && yarn npm publish | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} | ||
|
||
deploy: | ||
runs-on: ubuntu-latest | ||
registry-url: "https://registry.npmjs.org" | ||
|
||
needs: pre_release | ||
- name: Cache dependencies | ||
id: cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: "**/node_modules" | ||
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }} | ||
|
||
if: ${{ github.event_name == 'push' }} | ||
- name: Install dependencies | ||
if: steps.cache.outputs.cache-hit != 'true' | ||
run: yarn install --immutable | ||
|
||
steps: | ||
- run: echo "Uncomment the lines below and delete this one." | ||
# - name: Trigger RefApp Build | ||
# uses: fjogeleit/http-request-action@master | ||
# with: | ||
# url: https://ci.openmrs.org/rest/api/latest/queue/REFAPP-D3X | ||
# method: "POST" | ||
# customHeaders: '{ "Authorization": "Bearer ${{ secrets.BAMBOO_TOKEN }}" }' | ||
- run: yarn turbo build --color | ||
- run: yarn run ci:publish | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
# UgandaEMR Stock Management | ||
|
||
This is a frontend module for managing a stock of essential medicines and drugs built for UgandaEMR+. | ||
|
||
A frontend module that handles stock management in UgandaEMR+. This frontend module uses the [Community backend module](https://github.com/METS-Programme/openmrs-module-ugandaemr-commodity). |
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
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
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
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
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
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.