Skip to content

Commit

Permalink
Pre-release CI fixes (#105)
Browse files Browse the repository at this point in the history
* version 1.0.2

* wip

* adds ci-test to hooks

* clean up

* renames branch name
  • Loading branch information
pirupius authored Aug 31, 2023
1 parent 258d068 commit 698a401
Show file tree
Hide file tree
Showing 11 changed files with 55 additions and 40 deletions.
75 changes: 45 additions & 30 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,48 +9,47 @@ on:
types:
- created

env:
TURBO_API: 'http://127.0.0.1:9080'
TURBO_TOKEN: ${{ secrets.TURBO_SERVER_TOKEN }}
TURBO_TEAM: ${{ github.repository_owner }}

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 }}
permissions:
actions: read

steps:
- uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: "18.x"

registry-url: "https://registry.npmjs.org"
node-version: '16'

- name: Cache dependencies
id: cache
uses: actions/cache@v3
with:
path: "**/node_modules"
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
- name: Setup a local cache server for Turborepo
uses: felixmosh/turborepo-gh-artifacts@v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
server-token: ${{ secrets.TURBO_SERVER_TOKEN }}
server-token: ${{ env.TURBO_TOKEN }}

- run: yarn verify
- run: yarn turbo build --color --concurrency=5
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: packages
path: |
packages/**/dist

- name: Run lint, type checks and tests
run: yarn verify

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

pre_release:
runs-on: ubuntu-latest
Expand All @@ -61,16 +60,17 @@ jobs:

steps:
- uses: actions/checkout@v3
- name: Download Artifacts
uses: actions/download-artifact@v2
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: '16'
registry-url: "https://registry.npmjs.org"

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

- name: Install dependencies
Expand All @@ -81,13 +81,13 @@ jobs:
uses: felixmosh/turborepo-gh-artifacts@v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
server-token: ${{ secrets.TURBO_SERVER_TOKEN }}
server-token: ${{ env.TURBO_TOKEN }}

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

- name: Build
run: yarn turbo run build --color --concurrency=5
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
Expand All @@ -97,6 +97,14 @@ jobs:
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}

- name: Upload build artifacts
uses: actions/upload-artifact@v3
with:
name: packages
path: |
packages/**/dist
release:
runs-on: ubuntu-latest

Expand All @@ -106,13 +114,11 @@ jobs:

steps:
- uses: actions/checkout@v3
- 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'
node-version: '16'
registry-url: "https://registry.npmjs.org"

- name: Cache dependencies
id: cache
Expand All @@ -125,7 +131,16 @@ jobs:
if: steps.cache.outputs.cache-hit != 'true'
run: yarn install --immutable

- run: yarn turbo run build --color
- run: yarn run ci:publish
- name: Setup local cache server for Turborepo
uses: felixmosh/turborepo-gh-artifacts@v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
server-token: ${{ env.TURBO_TOKEN }}

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

- name: Publish
run: yarn run ci:publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
],
"npmClient": "yarn",
"useWorkspaces": true,
"version": "1.0.1",
"version": "1.0.2",
"command": {
"publish": {
"verifyAccess": false
Expand Down
2 changes: 1 addition & 1 deletion packages/esm-family-health-app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ugandaemr/esm-family-health-app",
"version": "1.0.1",
"version": "1.0.2",
"license": "MPL-2.0",
"description": "Family health microfrontend for UgandaEMR",
"browser": "dist/esm-family-health-app.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/esm-hiv-app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ugandaemr/esm-hiv-app",
"version": "1.0.1",
"version": "1.0.2",
"license": "MPL-2.0",
"description": "HIV microfrontend for UgandaEMR",
"browser": "dist/esm-hiv-app.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/esm-ipd-app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ugandaemr/esm-inpatient-app",
"version": "1.0.1",
"version": "1.0.2",
"license": "MPL-2.0",
"description": "Inpatient department microfrontend for UgandaEMR",
"browser": "dist/esm-inpatient-app.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/esm-outpatient-app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ugandaemr/esm-outpatient-app",
"version": "1.0.1",
"version": "1.0.2",
"license": "MPL-2.0",
"description": "Outpatient microfrontend for UgandaEMR",
"browser": "dist/esm-outpatient-app.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/esm-patient-queues-app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ugandaemr/esm-patient-queues-app",
"version": "1.0.1",
"version": "1.0.2",
"license": "MPL-2.0",
"description": "Patient queues microfrontend for UgandaEMR",
"browser": "dist/esm-patient-queues-app.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/esm-radiology-app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ugandaemr/esm-radiology-app",
"version": "1.0.1",
"version": "1.0.2",
"license": "MPL-2.0",
"description": "Radiology microfrontend for UgandaEMR",
"browser": "dist/esm-radiology-app.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/esm-tb-app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ugandaemr/esm-tb-app",
"version": "1.0.1",
"version": "1.0.2",
"license": "MPL-2.0",
"description": "tb microfrontend for UgandaEMR",
"browser": "dist/esm-tb-app.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/esm-theatre-app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ugandaemr/esm-theatre-app",
"version": "1.0.1",
"version": "1.0.2",
"license": "MPL-2.0",
"description": "Theatre microfrontend for UgandaEMR",
"browser": "dist/esm-theatre-app.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/esm-ugandaemr-app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ugandaemr/esm-ugandaemr-app",
"version": "1.0.1",
"version": "1.0.2",
"license": "MPL-2.0",
"description": "UgandaEMR microfrontend built on top of OpenMRS 3.x and OHRI",
"browser": "dist/esm-ugandaemr-app.js",
Expand Down

0 comments on commit 698a401

Please sign in to comment.