-
Notifications
You must be signed in to change notification settings - Fork 2
[BB2-941] Add Tests CI Check For Sample NodeJS App #11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
JFU-GIT
merged 23 commits into
master
from
jfuqian/BB2-941-Add-Tests-CI-Check-Sample-NodeJS-App
Mar 22, 2022
Merged
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
f361a46
cbc jenkins pipeline etc.
fbe9539
first cut eslintrc for client and server and code linted.
64983e4
Merge remote-tracking branch 'origin/master' into jfuqian/BB2-941-Add…
75f36cf
add config to pipeline.
3dca8f0
fix pipeline command.
24c4410
comment out server and client start.
a41fad3
see if picked up by CI jenkins job.
8f007bc
add nock(mock) based tests.
130f592
Merge remote-tracking branch 'origin/master' into jfuqian/BB2-941-Add…
82a5bd7
Merge remote-tracking branch 'origin/master' into jfuqian/BB2-941-Add…
d13d56d
relint after sync with master and fix eslint crash by reverse eslint …
5bd0e30
leverage github action for CI.
0d700bd
more linting and remove jenkins based CI, use github action based CI.
5595209
run server tests in CI.
c3b29e4
port github action workflow from staging repo (tested).
79c8bc8
Merge remote-tracking branch 'origin/master' into jfuqian/BB2-941-Add…
1396c71
sync with main
8505ff1
sync yarn.lock
709cad4
cleanup dependencies.
bb92820
cleanup, use jest for tests.
7656459
add how to run tests to readme.
a7541ee
make lint quiet.
57c6e03
git ignore yarn.lock
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,45 @@ | ||
| <!-- | ||
| You've got a Pull Request you want to submit? Awesome! | ||
| This PR template is here to help ensure you're setup for success: | ||
| please fill it out to help ensure that your PR is complete and ready for approval. | ||
| --> | ||
|
|
||
| **JIRA Ticket:** | ||
| [SOMEPROJECT-42](https://jira.cms.gov/browse/SOMEPROJECT-42) | ||
|
|
||
| **User Story or Bug Summary:** | ||
|
|
||
| <!-- Please copy-paste the brief user story or bug description that this PR is intended to address. --> | ||
|
|
||
| ### What Does This PR Do? | ||
|
|
||
| <!-- | ||
| Add detailed description & discussion of changes here. | ||
| The contents of this section should be used as your commit message (unless you merge the PR via a merge commit, of course). | ||
|
|
||
| Please follow standard Git commit message guidelines: | ||
| * First line should be a capitalized, short (50 chars or less) summary. | ||
| * The rest of the message should be in standard Markdown format, wrapped to 72 characters. | ||
| * Describe your changes in imperative mood, e.g. "make xyzzy do frotz" instead of "[This patch] makes xyzzy do frotz" or "[I] changed xyzzy to do frotz", as if you are giving orders to the codebase to change its behavior. | ||
| * List all relevant Jira issue keys, one per line at the end of the message, per: <https://confluence.atlassian.com/jirasoftwarecloud/processing-issues-with-smart-commits-788960027.html>. | ||
|
|
||
| Reference: <https://git-scm.com/book/en/v2/Distributed-Git-Contributing-to-a-Project>. | ||
| --> | ||
|
|
||
| ### What Should Reviewers Watch For? | ||
|
|
||
| <!-- | ||
| Add some items to the following list, or remove the entire section if it doesn't apply for some reason. | ||
|
|
||
| Common items include: | ||
| * Is this likely to address the goals expressed in the user story? | ||
| * Are any additional documentation updates needed? | ||
| * Are there any unhandled and/or untested edge cases you can think of? | ||
| * Is user input properly sanitized & handled? | ||
| * Does this make any backwards-incompatible changes that might break end user clients? | ||
| * Can you find any bugs if you run the code locally and test it manually? | ||
| --> | ||
|
|
||
| If you're reviewing this PR, please check these things, in particular: | ||
|
|
||
| - TODO |
This file contains hidden or 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,32 @@ | ||
| name: CI for Node.js React Sample App | ||
| on: [push] | ||
| jobs: | ||
| build: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v2 | ||
|
|
||
| - uses: actions/setup-node@v2 | ||
| with: | ||
| node-version: 14 | ||
|
|
||
| - name: Install server | ||
| run: yarn --cwd server install | ||
|
|
||
| - name: Install client | ||
| run: yarn --cwd client install | ||
|
|
||
| - name: Lint server source | ||
| run: yarn --cwd server lint | ||
|
|
||
| - name: Lint client source | ||
| run: yarn --cwd client lint | ||
|
|
||
| - name: Copy config | ||
| run: cp server/src/configs/sample.config.ts server/src/configs/config.ts | ||
|
|
||
| - name: Copy .env | ||
| run: cp server/src/pre-start/env/sandbox.sample.env server/src/pre-start/env/development.env | ||
|
|
||
| - name: Run server tests | ||
| run: yarn --cwd server test |
This file contains hidden or 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 |
|---|---|---|
|
|
@@ -17,6 +17,8 @@ npm-debug.log* | |
| yarn-debug.log* | ||
| yarn-error.log* | ||
|
|
||
| server/yarn.lock | ||
|
|
||
| .vscode | ||
| .idea | ||
|
|
||
|
|
||
This file contains hidden or 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
Empty file.
This file contains hidden or 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 |
|---|---|---|
|
|
@@ -21,3 +21,5 @@ | |
| npm-debug.log* | ||
| yarn-debug.log* | ||
| yarn-error.log* | ||
|
|
||
| client/yarn.lock | ||
This file contains hidden or 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,25 @@ | ||
| { | ||
| "env": { | ||
| "browser": true, | ||
| "es2021": true | ||
| }, | ||
| "extends": [ | ||
| "eslint:recommended", | ||
| "plugin:react/recommended", | ||
| "plugin:@typescript-eslint/recommended" | ||
| ], | ||
| "parser": "@typescript-eslint/parser", | ||
| "parserOptions": { | ||
| "ecmaFeatures": { | ||
| "jsx": true | ||
| }, | ||
| "ecmaVersion": 12 | ||
| }, | ||
| "plugins": [ | ||
| "react", | ||
| "@typescript-eslint" | ||
| ], | ||
| "rules": { | ||
| "@typescript-eslint/no-explicit-any": "off" | ||
| } | ||
| } |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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,3 +1,4 @@ | ||
| import React from 'react'; | ||
| import ReactDOM from 'react-dom'; | ||
| import './styles/index.scss'; | ||
|
|
||
|
|
||
This file contains hidden or 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,9 +1,9 @@ | ||
| export type Authorization = { | ||
| access_token: string, | ||
| expires_in: number, | ||
| token_type: string, | ||
| accessToken: string, | ||
| expiresIn: number, | ||
| tokenType: string, | ||
| scope: [string], | ||
| refresh_token: string, | ||
| refreshToken: string, | ||
| patient: string, | ||
| expires_at: string | ||
| expiresAt: string | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did this get added to all these files because of the new linting?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes