Skip to content

Commit

Permalink
Merge branch 'main' into chore/bump-form-engine
Browse files Browse the repository at this point in the history
  • Loading branch information
denniskigen authored Jul 26, 2023
2 parents 195069e + cce74ba commit 86cd310
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 54 deletions.
74 changes: 34 additions & 40 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,32 +24,25 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v1
with:
node-version: "16.x"

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

- name: Install dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: yarn
node-version: "18.x"
- 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: Run tests, lint and typechecking
run: yarn verify

- name: Run build
run: yarn turbo build --color

- run: yarn verify
- run: yarn turbo build --color
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: dist
path: |
dist
pre_release:
runs-on: ubuntu-latest
Expand All @@ -63,25 +56,13 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: "16.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') }}
node-version: "18.x"

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

- name: Version
run: yarn version "$(node -e "console.log(require('semver').inc(require('./package.json').version, 'patch'))")-pre.${{ github.run_number }}"
- run: yarn version "$(node -e "console.log(require('semver').inc(require('./package.json').version, 'patch'))")-pre.${{ github.run_number }}"

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

- run: git config user.email "[email protected]" && git config user.name "OpenMRS CI"
- run: git add . && git commit -m "Prerelease version" --no-verify
Expand All @@ -90,6 +71,13 @@ jobs:
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
Expand All @@ -101,16 +89,22 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Download Artifacts
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: "16.x"
registry-url: 'https://registry.npmjs.org'
- run: yarn
- run: yarn config set npmAuthToken "${NODE_AUTH_TOKEN}" && yarn npm publish --access public --tag latest
node-version: "18.x"
- run: yarn install --immutable
- run: yarn turbo build --color
- run: yarn config set npmAuthToken "${NODE_AUTH_TOKEN}" && yarn npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: dist
path: |
dist
deploy_form_builder:
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@openmrs/esm-form-builder-app",
"version": "2.0.0",
"version": "2.0.1",
"license": "MPL-2.0",
"description": "OpenMRS ESM Form Builder App",
"browser": "dist/openmrs-esm-form-builder-app.js",
Expand Down
12 changes: 2 additions & 10 deletions webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,9 @@
const path = require("path");
const config = (module.exports = require("openmrs/default-webpack-config"));
config.scriptRuleConfig.exclude =
path.sep == "/"
? /(node_modules[^\/@openmrs\/esm\-patient\-common\-lib])/
: /(node_modules[^\\@openmrs\/esm\-patient\-common\-lib])/;
config.scriptRuleConfig.exclude = /(node_modules(?![/\\]@(?:openmrs|ohri)))/;
config.overrides.resolve = {
extensions: [".tsx", ".ts", ".jsx", ".js", ".scss"],
extensions: [".tsx", ".ts", ".jsx", ".js", ".scss", ".json"],
alias: {
"@openmrs/esm-framework": "@openmrs/esm-framework/src/internal",
"openmrs-esm-ohri-commons-lib": path.resolve(
__dirname,
"../esm-commons-lib/src/index"
),
"@openmrs/openmrs-form-engine-lib":
"@openmrs/openmrs-form-engine-lib/src/index",
},
Expand Down
6 changes: 3 additions & 3 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5802,9 +5802,9 @@ __metadata:
linkType: hard

"caniuse-lite@npm:^1.0.0, caniuse-lite@npm:^1.0.30001400, caniuse-lite@npm:^1.0.30001426":
version: 1.0.30001431
resolution: "caniuse-lite@npm:1.0.30001431"
checksum: bc8ab55cd194e240152946b54bfaff7456180cc018674fc7ed134f4f502192405f6643f422feaa0a5e7cc02b5bac564cfac7771ac6d29f5d129482fcfe335ba1
version: 1.0.30001517
resolution: "caniuse-lite@npm:1.0.30001517"
checksum: e4e87436ae1c4408cf4438aac22902b31eb03f3f5bad7f33bc518d12ffb35f3fd9395ccf7efc608ee046f90ce324ec6f7f26f8a8172b8c43c26a06ecee612a29
languageName: node
linkType: hard

Expand Down

0 comments on commit 86cd310

Please sign in to comment.