-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* nx integrated monorepo * rebuild package-lock * migrated documentation app * renamed tsconfig.json files to fix vscode errors * changed library path to index.ts * fixed some import paths * fixed import path * fixed default theme paths * import karma.base.conf in root karma.conf * fixed tsconfig.prod * fix vscode type errors for merged interface declaration * updated readme * fixed Dockerfile * update angular to fix bundle size issue * code formatting * added deploy target, updated github workflows * require format check before deploy * setup node before format check * npm ci before format check * removed unnecessary npm scripts * fetch depth for format check * set shas for format check * removed watch step from readme * fixed library dest dir * fixed documentation app * updated repository.directory in package.json * moved sort-datasets.pipe.ts * code formatting * code formatting * code formatting * code formatting
- Loading branch information
Showing
322 changed files
with
18,483 additions
and
31,009 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,93 @@ | ||
name: Pull Request | ||
|
||
on: | ||
push: | ||
branches: ["main"] | ||
pull_request: | ||
branches: ["main"] | ||
|
||
permissions: | ||
pull-requests: read # allows SonarCloud to decorate PRs with analysis results | ||
|
||
env: | ||
NODE_VERSION: 18.x | ||
|
||
jobs: | ||
format: | ||
name: Code Formatting | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- uses: nrwl/nx-set-shas@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ env.NODE_VERSION }} | ||
cache: "npm" | ||
- run: npm ci | ||
- run: npx nx format:check | ||
|
||
build-affected: | ||
name: Production Build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- uses: nrwl/nx-set-shas@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ env.NODE_VERSION }} | ||
cache: "npm" | ||
- run: npm ci | ||
- run: npx nx affected -t build --parallel=5 | ||
|
||
test-affected: | ||
name: Test and Scan | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- uses: nrwl/nx-set-shas@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ env.NODE_VERSION }} | ||
cache: "npm" | ||
- run: npm ci | ||
- run: npx nx affected -t test --parallel=5 --no-watch --code-coverage | ||
- name: Analyze with SonarCloud | ||
uses: SonarSource/sonarcloud-github-action@master | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information | ||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} # Generate a token on Sonarcloud.io, add it to the secrets of this repo with the name SONAR_TOKEN (Settings > Secrets > Actions > add new repository secret) | ||
with: | ||
args: | ||
# Unique keys of your project and organization. You can find them in SonarCloud > Information (bottom-left menu) | ||
# mandatory | ||
-Dsonar.projectKey=elimuinformatics_charts-on-fhir | ||
-Dsonar.organization=elimuinformatics-1 | ||
-Dsonar.javascript.lcov.reportPaths=coverage/**/lcov.info | ||
-Dsonar.coverage.exclusions=**/*.spec.ts,**/test.ts,**/main.ts,**/polyfills.ts,**/*.module.ts,**/environment*.ts,**/*.js,projects/synthea-utils/*,apps/documentation/**/* | ||
-Dsonar.test.inclusions=**/*.spec.ts,**/test.ts | ||
|
||
deploy-affected: | ||
name: Deploy Applications | ||
if: ${{ github.ref == 'refs/heads/main' }} | ||
needs: | ||
- format | ||
- test-affected | ||
- build-affected | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- uses: nrwl/nx-set-shas@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ env.NODE_VERSION }} | ||
cache: "npm" | ||
- run: npm ci | ||
- run: npx nx affected -t deploy --parallel=5 |
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 |
---|---|---|
@@ -0,0 +1,56 @@ | ||
name: Release | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
env: | ||
NODE_VERSION: 18.x | ||
|
||
jobs: | ||
publish: | ||
name: Publish to NPM | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ env.NODE_VERSION }} | ||
registry-url: https://registry.npmjs.org/ | ||
cache: npm | ||
- run: npm ci | ||
- run: npm run build ngx-charts-on-fhir | ||
- run: npm publish dist/libs/ngx-charts-on-fhir/ --access public | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
|
||
build-docs: | ||
name: Build Documentation | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ env.NODE_VERSION }} | ||
cache: "npm" | ||
- run: npm ci | ||
- run: npm run build documentation -- --base-href=/charts-on-fhir/ | ||
- run: cp dist/apps/documentation/index.html dist/apps/documentation/404.html # Needed for Angular routing | ||
- uses: actions/upload-pages-artifact@main | ||
with: | ||
path: dist/apps/documentation | ||
|
||
deploy-docs: | ||
name: Publish Documentation | ||
needs: build-docs | ||
permissions: | ||
pages: write # to deploy to Pages | ||
id-token: write # to verify the deployment originates from an appropriate source | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v1 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
{ | ||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=827846 | ||
"recommendations": ["angular.ng-template"] | ||
"recommendations": ["angular.ng-template", "nrwl.angular-console", "dbaeumer.vscode-eslint", "esbenp.prettier-vscode"] | ||
} |
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
Oops, something went wrong.