Skip to content
This repository has been archived by the owner on Dec 6, 2024. It is now read-only.

feat: test coverage #456

Merged
merged 5 commits into from
Apr 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions .github/workflows/unit-test-code-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
pull_request:
branches:
- develop
- 'feat-*'
- "feat-*"
jobs:
static-code-analysis-and-unit-test:
name: Unit Tests & Code Analysis
Expand All @@ -31,10 +31,15 @@ jobs:
- name: Install Node.js dependencies
run: |
npm install -g pnpm
npm install -g codecov
pnpm recursive install --unsafe-perm --stream
- name: Run static code analysis & linting tests
run: |
./scripts/run-static-code-analysis.sh --stream
- name: Run unit tests
run: |
./scripts/run-unit-tests.sh --stream
pnpm run coverage --recursive --if-present --stream
- name: CodeCov
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos, but helps in smoother report uploads
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
**/.class
**/.DS_Store
**/coverage
**/node_modules
**/npm-debug.log
**/pnpm-debug.log
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
**/.class
**/.DS_Store
**/coverage
**/node_modules

**/npm-debug.log
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"source-map-support": "^0.5.16"
},
"scripts": {
"coverage": "NODE_ENV=test jest --config jest.config.js --passWithNoTests --verbose --collectCoverage --watchAll=false --coverage && codecov",
"test": "NODE_ENV=test jest --config jest.config.js --passWithNoTests",
"test:watch": "NODE_ENV=test jest --config jest.config.js --passWithNoTests --watchAll",
"lint": "pnpm run lint:eslint && pnpm run lint:prettier",
Expand Down
1 change: 1 addition & 0 deletions addons/addon-base-raas-ui/packages/base-raas-ui/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

**/.class
**/.DS_Store
**/coverage
**/node_modules

**/npm-debug.log
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@
"regenerator-runtime": "^0.13.5"
},
"scripts": {
"coverage": "NODE_ENV=test jest --config jest.config.js --passWithNoTests --verbose --collectCoverage --watchAll=false --coverage && codecov",
"test": "NODE_ENV=test jest --config jest.config.js --passWithNoTests",
"test:watch": "NODE_ENV=test jest --config jest.config.js --passWithNoTests --watchAll",
"babel": "babel src/ --out-dir dist/ --source-maps",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
**/.class
**/.DS_Store
**/coverage
**/node_modules

**/npm-debug.log
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"babel:watch": "babel src/ --out-dir dist/ --source-maps --watch",
"build": "pnpm run babel",
"build:watch": "pnpm run babel:watch",
"coverage": "NODE_ENV=test jest --config jest.config.js --passWithNoTests --verbose --collectCoverage --watchAll=false --coverage && codecov",
"test": "NODE_ENV=test jest --config jest.config.js --passWithNoTests",
"test:watch": "NODE_ENV=test jest --config jest.config.js --passWithNoTests --watchAll",
"lint": "pnpm run lint:eslint && pnpm run lint:prettier",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
**/.class
**/.DS_Store
**/coverage
**/node_modules

**/npm-debug.log
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"source-map-support": "^0.5.16"
},
"scripts": {
"coverage": "NODE_ENV=test jest --config jest.config.js --passWithNoTests --verbose --collectCoverage --watchAll=false --coverage && codecov",
"test": "NODE_ENV=test jest --config jest.config.js --passWithNoTests",
"test:watch": "NODE_ENV=test jest --config jest.config.js --passWithNoTests --watchAll",
"lint": "pnpm run lint:eslint && pnpm run lint:prettier",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
**/.class
**/.DS_Store
**/coverage
**/node_modules

**/npm-debug.log
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"source-map-support": "^0.5.16"
},
"scripts": {
"coverage": "NODE_ENV=test jest --config jest.config.js --passWithNoTests --verbose --collectCoverage --watchAll=false --coverage && codecov",
"test": "NODE_ENV=test jest --config jest.config.js --passWithNoTests",
"test:watch": "NODE_ENV=test jest --config jest.config.js --passWithNoTests --watchAll",
"lint": "pnpm run lint:eslint && pnpm run lint:prettier",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
**/.class
**/.DS_Store
**/coverage
**/node_modules

**/npm-debug.log
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
"eslint-plugin-jest": "^22.21.0",
"eslint-plugin-prettier": "^3.1.2",
"@aws-ee/base-workflow-core": "workspace:*",
"@aws-ee/environment-type-mgmt-services": "workspace:*",
"husky": "^3.1.0",
"jest": "^24.9.0",
"jest-junit": "^10.0.0",
Expand All @@ -43,6 +42,7 @@
"source-map-support": "^0.5.16"
},
"scripts": {
"coverage": "NODE_ENV=test jest --config jest.config.js --passWithNoTests --verbose --collectCoverage --watchAll=false --coverage && codecov",
"test": "NODE_ENV=test jest --config jest.config.js --passWithNoTests",
"test:watch": "NODE_ENV=test jest --config jest.config.js --passWithNoTests --watchAll",
"lint": "pnpm run lint:eslint && pnpm run lint:prettier",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
**/.class
**/.DS_Store
**/coverage
**/node_modules

**/npm-debug.log
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"aws-sdk-mock": "^5.1.0"
},
"scripts": {
"coverage": "NODE_ENV=test jest --config jest.config.js --passWithNoTests --verbose --collectCoverage --watchAll=false --coverage && codecov",
"test": "NODE_ENV=test jest --config jest.config.js --passWithNoTests",
"test:watch": "NODE_ENV=test jest --config jest.config.js --passWithNoTests --watchAll",
"lint": "pnpm run lint:eslint && pnpm run lint:prettier",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
**/.class
**/.DS_Store
**/coverage
**/node_modules

**/npm-debug.log
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"source-map-support": "^0.5.16"
},
"scripts": {
"coverage": "NODE_ENV=test jest --config jest.config.js --passWithNoTests --verbose --collectCoverage --watchAll=false --coverage && codecov",
"test": "NODE_ENV=test jest --config jest.config.js --passWithNoTests",
"test:watch": "NODE_ENV=test jest --config jest.config.js --passWithNoTests --watchAll",
"lint": "pnpm run lint:eslint && pnpm run lint:prettier",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
**/.class
**/.DS_Store
**/coverage
**/node_modules

**/npm-debug.log
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"source-map-support": "^0.5.16"
},
"scripts": {
"coverage": "NODE_ENV=test jest --config jest.config.js --passWithNoTests --verbose --collectCoverage --watchAll=false --coverage && codecov",
"test": "NODE_ENV=test jest --config jest.config.js --passWithNoTests",
"test:watch": "NODE_ENV=test jest --config jest.config.js --passWithNoTests --watchAll",
"lint": "pnpm run lint:eslint && pnpm run lint:prettier",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
**/.class
**/.DS_Store
**/coverage
**/node_modules

**/npm-debug.log
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"source-map-support": "^0.5.16"
},
"scripts": {
"coverage": "NODE_ENV=test jest --config jest.config.js --passWithNoTests --verbose --collectCoverage --watchAll=false --coverage && codecov",
"test": "NODE_ENV=test jest --config jest.config.js --passWithNoTests",
"test:watch": "NODE_ENV=test jest --config jest.config.js --passWithNoTests --watchAll",
"lint": "pnpm run lint:eslint && pnpm run lint:prettier",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
**/.class
**/.DS_Store
**/coverage
**/node_modules

**/npm-debug.log
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"source-map-support": "^0.5.16"
},
"scripts": {
"coverage": "NODE_ENV=test jest --config jest.config.js --passWithNoTests --verbose --collectCoverage --watchAll=false --coverage && codecov",
"test": "NODE_ENV=test jest --config jest.config.js --passWithNoTests",
"test:watch": "NODE_ENV=test jest --config jest.config.js --passWithNoTests --watchAll",
"lint": "pnpm run lint:eslint && pnpm run lint:prettier",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
**/.class
**/.DS_Store
**/coverage
**/node_modules

**/npm-debug.log
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"source-map-support": "^0.5.16"
},
"scripts": {
"coverage": "NODE_ENV=test jest --config jest.config.js --passWithNoTests --verbose --collectCoverage --watchAll=false --coverage && codecov",
"test": "NODE_ENV=test jest --config jest.config.js --passWithNoTests",
"test:watch": "NODE_ENV=test jest --config jest.config.js --passWithNoTests --watchAll",
"lint": "pnpm run lint:eslint && pnpm run lint:prettier",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
**/.class
**/.DS_Store
**/coverage
**/node_modules

**/npm-debug.log
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"source-map-support": "^0.5.16"
},
"scripts": {
"coverage": "NODE_ENV=test jest --config jest.config.js --passWithNoTests --verbose --collectCoverage --watchAll=false --coverage && codecov",
"test": "NODE_ENV=test jest --config jest.config.js --passWithNoTests",
"test:watch": "NODE_ENV=test jest --config jest.config.js --passWithNoTests --watchAll",
"lint": "pnpm run lint:eslint && pnpm run lint:prettier",
Expand Down
1 change: 1 addition & 0 deletions addons/addon-base-rest-api/packages/services/.gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
**/.class
**/.DS_Store
**/coverage
**/node_modules

**/npm-debug.log
Expand Down
1 change: 1 addition & 0 deletions addons/addon-base-rest-api/packages/services/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
"source-map-support": "^0.5.16"
},
"scripts": {
"coverage": "NODE_ENV=test jest --config jest.config.js --passWithNoTests --verbose --collectCoverage --watchAll=false --coverage && codecov",
"test": "NODE_ENV=test jest --config jest.config.js --passWithNoTests",
"test:watch": "NODE_ENV=test jest --config jest.config.js --passWithNoTests --watchAll",
"lint": "pnpm run lint:eslint && pnpm run lint:prettier",
Expand Down
1 change: 1 addition & 0 deletions addons/addon-base-ui/packages/base-ui/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

**/.class
**/.DS_Store
**/coverage
**/node_modules

**/npm-debug.log
Expand Down
1 change: 1 addition & 0 deletions addons/addon-base-ui/packages/base-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
"webpack": "4.41.2"
},
"scripts": {
"coverage": "NODE_ENV=test jest --config jest.config.js --passWithNoTests --verbose --collectCoverage --watchAll=false --coverage && codecov",
"test": "NODE_ENV=test jest --config jest.config.js --passWithNoTests",
"test:watch": "NODE_ENV=test jest --config jest.config.js --passWithNoTests --watchAll",
"babel": "babel src/ --out-dir dist/ --source-maps",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
**/.class
**/.DS_Store
**/coverage
**/node_modules

**/npm-debug.log
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"pretty-quick": "^1.11.1"
},
"scripts": {
"coverage": "NODE_ENV=test jest --config jest.config.js --passWithNoTests --verbose --collectCoverage --watchAll=false --coverage && codecov",
"test": "NODE_ENV=test jest --config jest.config.js --passWithNoTests",
"test:watch": "NODE_ENV=test jest --config jest.config.js --passWithNoTests --watchAll",
"lint": "pnpm run lint:eslint && pnpm run lint:prettier",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
**/.class
**/.DS_Store
**/coverage
**/node_modules

**/npm-debug.log
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"source-map-support": "^0.5.16"
},
"scripts": {
"coverage": "NODE_ENV=test jest --config jest.config.js --passWithNoTests --verbose --collectCoverage --watchAll=false --coverage && codecov",
"test": "NODE_ENV=test jest --config jest.config.js --passWithNoTests",
"test:watch": "NODE_ENV=test jest --config jest.config.js --passWithNoTests --watchAll",
"lint": "pnpm run lint:eslint && pnpm run lint:prettier",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

**/.class
**/.DS_Store
**/coverage
**/node_modules

**/npm-debug.log
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
**/.class
**/.DS_Store
**/coverage
**/node_modules

**/npm-debug.log
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"source-map-support": "^0.5.16"
},
"scripts": {
"coverage": "NODE_ENV=test jest --config jest.config.js --passWithNoTests --verbose --collectCoverage --watchAll=false --coverage && codecov",
"test": "NODE_ENV=test jest --config jest.config.js --passWithNoTests",
"test:watch": "NODE_ENV=test jest --config jest.config.js --passWithNoTests --watchAll",
"lint": "pnpm run lint:eslint && pnpm run lint:prettier",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
**/.class
**/.DS_Store
**/coverage
**/node_modules

**/npm-debug.log
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"source-map-support": "^0.5.16"
},
"scripts": {
"coverage": "NODE_ENV=test jest --config jest.config.js --passWithNoTests --verbose --collectCoverage --watchAll=false --coverage && codecov",
"test": "NODE_ENV=test jest --config jest.config.js --passWithNoTests",
"test:watch": "NODE_ENV=test jest --config jest.config.js --passWithNoTests --watchAll",
"lint": "pnpm run lint:eslint && pnpm run lint:prettier",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
**/.class
**/.DS_Store
**/coverage
**/node_modules

**/npm-debug.log
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"source-map-support": "^0.5.16"
},
"scripts": {
"coverage": "NODE_ENV=test jest --config jest.config.js --passWithNoTests --verbose --collectCoverage --watchAll=false --coverage && codecov",
"test": "NODE_ENV=test jest --config jest.config.js --passWithNoTests",
"test:watch": "NODE_ENV=test jest --config jest.config.js --passWithNoTests --watchAll",
"lint": "pnpm run lint:eslint && pnpm run lint:prettier",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
**/.class
**/.DS_Store
**/coverage
**/node_modules

**/npm-debug.log
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"source-map-support": "^0.5.16"
},
"scripts": {
"coverage": "NODE_ENV=test jest --config jest.config.js --passWithNoTests --verbose --collectCoverage --watchAll=false --coverage && codecov",
"test": "NODE_ENV=test jest --config jest.config.js --passWithNoTests",
"test:watch": "NODE_ENV=test jest --config jest.config.js --passWithNoTests --watchAll",
"lint": "pnpm run lint:eslint && pnpm run lint:prettier",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
**/.class
**/.DS_Store
**/coverage
**/node_modules

**/npm-debug.log
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"pretty-quick": "^1.11.1"
},
"scripts": {
"coverage": "NODE_ENV=test jest --config jest.config.js --passWithNoTests --verbose --collectCoverage --watchAll=false --coverage && codecov",
"test": "NODE_ENV=test jest --config jest.config.js --passWithNoTests",
"test:watch": "NODE_ENV=test jest --config jest.config.js --passWithNoTests --watchAll",
"lint": "pnpm run lint:eslint && pnpm run lint:prettier",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
**/.class
**/.DS_Store
**/coverage
**/node_modules

**/npm-debug.log
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"pretty-quick": "^1.11.1"
},
"scripts": {
"coverage": "NODE_ENV=test jest --config jest.config.js --passWithNoTests --verbose --collectCoverage --watchAll=false --coverage && codecov",
"test": "NODE_ENV=test jest --config jest.config.js --passWithNoTests",
"test:watch": "NODE_ENV=test jest --config jest.config.js --passWithNoTests --watchAll",
"lint": "pnpm run lint:eslint && pnpm run lint:prettier",
Expand Down
Loading