e555c69e07
* feat: add coverage diff checker to test workflow * fix: run test workflow on pull requests only
30 lines
910 B
YAML
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
|