mars-v2-frontend/.github/workflows/test-runner.yaml
Yusuf Seyrek e555c69e07
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
2023-05-11 15:55:03 +02:00

30 lines
910 B
YAML

name: Test Runner
on: pull_request
jobs:
build:
name: Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: '20.x'
- name: Install dependencies
run: yarn
- 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:
# token: ${{ secrets.CODECOV_TOKEN }}
# files: coverage/lcov.info