forked from microsoft/sample-app-aoai-chatGPT
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Set up automated testing in Github Actions (#36)
- Loading branch information
1 parent
5a15076
commit ee4ac21
Showing
97 changed files
with
3,253 additions
and
2,914 deletions.
There are no files selected for viewing
Empty file.
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,41 @@ | ||
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code, and run tests | ||
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs | ||
|
||
name: Automated testing | ||
|
||
on: | ||
push: | ||
branches: [nj-stable-dev, nj-stable] | ||
pull_request: | ||
branches: [nj-stable-dev, nj-stable] | ||
|
||
jobs: | ||
build-and-test: | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: frontend | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Read .nvmrc | ||
run: echo "NODE_VERSION=$(cat .nvmrc)" >> $GITHUB_OUTPUT | ||
id: nvm | ||
- name: Use Node.js ${{ steps.nvm.outputs.NODE_VERSION }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: "${{ steps.nvm.outputs.NODE_VERSION }}" | ||
- name: Install dependencies | ||
run: npm ci | ||
- name: Check for critical vulnerabilities | ||
run: npm audit --audit-level=critical | ||
- name: Run ESLint check | ||
run: npm run lint | ||
- name: Run prettier check | ||
run: npm run prettier | ||
- name: Set maximum memory size for build + run build | ||
run: NODE_OPTIONS=--max_old_space_size=8192 npm run build --if-present | ||
- name: Run frontend tests | ||
run: npm run test:react | ||
- name: Run API tests | ||
run: npm run test:api |
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
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 @@ | ||
20.x |
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,13 +1,8 @@ | ||
{ | ||
"semi": false, | ||
"singleQuote": true, | ||
"arrowParens": "avoid", | ||
"trailingComma": "none", | ||
"endOfLine": "auto", | ||
"tabWidth": 2, | ||
"printWidth": 120, | ||
"bracketSpacing": true, | ||
"bracketSameLine": true, | ||
"jsxSingleQuote": false, | ||
"quoteProps": "as-needed" | ||
} | ||
"arrowParens": "always", | ||
"endOfLine": "lf", | ||
"printWidth": 100, | ||
"tabWidth": 2, | ||
"trailingComma": "es5", | ||
"useTabs": false | ||
} |
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,2 +1,2 @@ | ||
const mock = 'test-file-stub' | ||
export default mock | ||
const mock = "test-file-stub"; | ||
export default mock; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
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,3 +1,3 @@ | ||
const replaceAllInserter = require('string.prototype.replaceall') | ||
const replaceAllInserter = require("string.prototype.replaceall"); | ||
|
||
replaceAllInserter.shim() | ||
replaceAllInserter.shim(); |
Oops, something went wrong.