mirror of
https://github.com/SigNoz/signoz.git
synced 2025-12-21 17:36:37 +00:00
chore: added jest coverage setup (#4871)
* chore: added jest coverage setup * chore: added sample test changes * chore: revert sample code change * chore: changed script to add yarn install handle and removed checkouts to develop * chore: added fix for checkout issue * chore: added fix for checkout issue * chore: added fix for checkout issue * chore: added fix for checkout issue * chore: added sample test changes * chore: revert sample test cases * chore: adding coverage threshold * chore: added coverage threshold and sample test code * chore: testing fetch and checkout * chore: testing fetch and checkout * chore: testing fetch and checkout * chore: testing fetch and checkout * chore: testing fetch and checkout * chore: testing fetch and checkout * chore: testing fetch and checkout * chore: testing fetch and checkout * chore: testing fetch and checkout * chore: testing fetch and checkout * chore: testing fetch and checkout * chore: testing fetch and checkout * chore: testing fetch and checkout * chore: testing fetch and checkout * chore: testing fetch and checkout * chore: testing fetch and checkout * chore: code cleanup and threshold adjustment * chore: testing fetch and checkout
This commit is contained in:
parent
5e3dba2587
commit
c7668b9a78
31
.github/workflows/jest-coverage-changes.yml
vendored
Normal file
31
.github/workflows/jest-coverage-changes.yml
vendored
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
name: Jest Coverage - changed files
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
branches: develop
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
ref: "refs/heads/develop"
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }} # Provide the GitHub token for authentication
|
||||||
|
|
||||||
|
- name: Fetch branch
|
||||||
|
run: git fetch origin ${{ github.event.pull_request.head.ref }}
|
||||||
|
|
||||||
|
- run: |
|
||||||
|
git checkout ${{ github.event.pull_request.head.sha }}
|
||||||
|
|
||||||
|
- uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: lts/*
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: cd frontend && npm install -g yarn && yarn
|
||||||
|
|
||||||
|
- name: npm run test:changedsince
|
||||||
|
run: cd frontend && npm run i18n:generate-hash && npm run test:changedsince
|
||||||
@ -35,6 +35,14 @@ const config: Config.InitialOptions = {
|
|||||||
browsers: ['chromium', 'firefox', 'webkit'],
|
browsers: ['chromium', 'firefox', 'webkit'],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
coverageThreshold: {
|
||||||
|
global: {
|
||||||
|
statements: 80,
|
||||||
|
branches: 65,
|
||||||
|
functions: 80,
|
||||||
|
lines: 80,
|
||||||
|
},
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
export default config;
|
export default config;
|
||||||
|
|||||||
@ -21,7 +21,9 @@
|
|||||||
"playwright:codegen:local": "playwright codegen http://localhost:3301",
|
"playwright:codegen:local": "playwright codegen http://localhost:3301",
|
||||||
"playwright:codegen:local:auth": "yarn playwright:codegen:local --load-storage=tests/auth.json",
|
"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/*",
|
"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": {
|
"engines": {
|
||||||
"node": ">=16.15.0"
|
"node": ">=16.15.0"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user