WIP: MP 2693 create a script to ensure code coverage improvement on p rs (#194)

* feat: add coverage diff checker to test workflow

* fix: run test workflow on pull requests only
This commit is contained in:
Yusuf Seyrek 2023-05-11 16:55:03 +03:00 committed by GitHub
parent 5a71ace0d6
commit e555c69e07
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 7 deletions

View File

@ -1,10 +1,6 @@
name: Test Runner
on:
push:
branches: [develop, main]
pull_request:
branches: [develop, main]
on: pull_request
jobs:
build:
@ -19,8 +15,13 @@ jobs:
node-version: '20.x'
- name: Install dependencies
run: yarn
- name: Run tests
run: yarn test
- name: Test Coverage
id: testCoverage
uses: anuraag016/Jest-Coverage-Diff@master
with:
fullCoverageDiff: false
runCommand: 'yarn jest --collectCoverageFrom=''["src/**/*.{js,jsx,ts,tsx}"]'' --coverage --collectCoverage=true --coverageDirectory=''./'' --coverageReporters=''json-summary'' --forceExit --detectOpenHandles __tests__/**/*.test.*'
delta: 0.5
# - name: Upload coverage reports to Codecov
# uses: codecov/codecov-action@v3
# with:

1
.gitignore vendored
View File

@ -7,6 +7,7 @@
# testing
/coverage
.coverage-summary.json
# next.js
/.next/