Skip to content
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

chore: added jest coverage setup #4870

Closed
wants to merge 52 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
11a6426
chore: added jest coverage setup
SagarRajput-7 Apr 15, 2024
60e1990
chore: added jest coverage setup - added file directory
SagarRajput-7 Apr 15, 2024
133072f
chore: added jest coverage setup - added file directory
SagarRajput-7 Apr 15, 2024
43f53e0
chore: added jest coverage setup - added file directory
SagarRajput-7 Apr 15, 2024
831d2a0
chore: added jest coverage setup - added file directory
SagarRajput-7 Apr 15, 2024
0bbe3f3
chore: added jest coverage setup - added file directory
SagarRajput-7 Apr 15, 2024
46d404d
chore: added jest coverage setup - added file directory
SagarRajput-7 Apr 15, 2024
b796fa4
chore: added jest coverage setup - added file directory
SagarRajput-7 Apr 15, 2024
da44e9d
chore: added jest coverage setup - added file directory
SagarRajput-7 Apr 15, 2024
a3c06be
chore: added jest coverage setup - added file directory
SagarRajput-7 Apr 15, 2024
b47d7fd
chore: added jest coverage setup - added file directory
SagarRajput-7 Apr 15, 2024
f584652
chore: fixed script
SagarRajput-7 Apr 15, 2024
edfcbfb
chore: fixed script
SagarRajput-7 Apr 15, 2024
7b654b8
chore: fixed script
SagarRajput-7 Apr 15, 2024
4b690fe
chore: fixed script
SagarRajput-7 Apr 15, 2024
b4b8f52
chore: fixed script
SagarRajput-7 Apr 15, 2024
a538a00
chore: fixed script
SagarRajput-7 Apr 15, 2024
990189b
chore: fixed script
SagarRajput-7 Apr 15, 2024
c1b8634
chore: fixed script
SagarRajput-7 Apr 15, 2024
589e9f3
chore: fixed script
SagarRajput-7 Apr 15, 2024
16d5b0e
chore: fixed script
SagarRajput-7 Apr 15, 2024
e782275
chore: fixed script
SagarRajput-7 Apr 15, 2024
6748c39
chore: fixed script
SagarRajput-7 Apr 15, 2024
433974d
chore: fixed script
SagarRajput-7 Apr 15, 2024
95aeae3
chore: fixed script
SagarRajput-7 Apr 15, 2024
01160bc
chore: fixed script
SagarRajput-7 Apr 15, 2024
abc7c9b
chore: fixed package script
SagarRajput-7 Apr 15, 2024
c1399a2
chore: fixed package script
SagarRajput-7 Apr 15, 2024
37c1de7
chore: fixed package script
SagarRajput-7 Apr 15, 2024
df81e42
chore: fixed package script
SagarRajput-7 Apr 15, 2024
6ed4814
chore: fixed package script
SagarRajput-7 Apr 15, 2024
c1f5fa7
chore: test with code change
SagarRajput-7 Apr 15, 2024
ea661f4
chore: test with code change
SagarRajput-7 Apr 15, 2024
6f6de67
chore: test with code change
SagarRajput-7 Apr 15, 2024
af8ad8b
Merge branch 'develop' into jest-coverage-setup
SagarRajput-7 Apr 15, 2024
67cce7a
chore: test with code change
SagarRajput-7 Apr 15, 2024
d80bec3
chore: test with code change
SagarRajput-7 Apr 15, 2024
b964f2d
chore: test with code change
SagarRajput-7 Apr 15, 2024
9383905
chore: test with code change
SagarRajput-7 Apr 15, 2024
7f0d9ee
chore: test with code change
SagarRajput-7 Apr 15, 2024
5358c1f
chore: test with code change
SagarRajput-7 Apr 15, 2024
7d5b312
chore: test with code change
SagarRajput-7 Apr 15, 2024
0e9f71a
chore: test with code change
SagarRajput-7 Apr 15, 2024
b788d24
chore: test with code change
SagarRajput-7 Apr 15, 2024
ba76392
chore: test with code change
SagarRajput-7 Apr 15, 2024
79f3ceb
chore: test with code change
SagarRajput-7 Apr 15, 2024
8137ac1
chore: test with code change
SagarRajput-7 Apr 15, 2024
5eac82a
chore: test with code change
SagarRajput-7 Apr 15, 2024
db018ea
chore: test with code change
SagarRajput-7 Apr 15, 2024
485af84
chore: added jest run and coverage
SagarRajput-7 Apr 15, 2024
463ce12
chore: code cleanup
SagarRajput-7 Apr 15, 2024
5676534
chore: code cleanup and code revert
SagarRajput-7 Apr 15, 2024
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
27 changes: 27 additions & 0 deletions .github/workflows/jest-coverage-changes.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Jest Coverage Check - changed files

on:
pull_request:
branches:
- develop
- main
- release/v*

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- run: |
git checkout -b develop origin/develop
git checkout -

- name: Install dependencies
run: cd frontend && yarn install

- name: npm run test:changedsince
run: cd frontend && npm run i18n:generate-hash && npm run test:changedsince
9 changes: 8 additions & 1 deletion frontend/jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,14 @@ import type { Config } from '@jest/types';
const config: Config.InitialOptions = {
clearMocks: true,
coverageDirectory: 'coverage',
coverageReporters: ['text', 'cobertura', 'html', 'json-summary'],
coverageReporters: [
'text',
'cobertura',
'html',
'json-summary',
'lcov',
'json',
],
moduleFileExtensions: ['ts', 'tsx', 'js', 'json'],
modulePathIgnorePatterns: ['dist'],
moduleNameMapper: {
Expand Down
4 changes: 3 additions & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@
"playwright:codegen:local": "playwright codegen http://localhost:3301",
"playwright:codegen:local:auth": "yarn playwright:codegen:local --load-storage=tests/auth.json",
"husky:configure": "cd .. && husky install frontend/.husky && cd frontend && chmod ug+x .husky/*",
"commitlint": "commitlint --edit $1"
"commitlint": "commitlint --edit $1",
"test": "jest --coverage",
"test:changedsince": "jest --changedSince=develop --coverage --silent"
},
"engines": {
"node": ">=16.15.0"
Expand Down
Loading