-
Notifications
You must be signed in to change notification settings - Fork 2
41 lines (38 loc) · 1.12 KB
/
test.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: Test
on:
pull_request:
types: [ready_for_review, opened, synchronize, reopened]
paths:
- '**/*.ts'
- '**/*.vue'
- 'tsconfig*.json'
- 'jest.config.ts'
- 'package-lock.json'
branches:
- main
jobs:
test:
if: github.event.pull_request.draft == false
name: Unit
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
cache: 'npm'
- run: npm ci
- name: Tests
uses: anuraag016/Jest-Coverage-Diff@master
with:
runCommand: "JEST_JUNIT_CLASSNAME='{classname}' JEST_JUNIT_TITLE='{title}' npx jest --coverage --coverageReporters='json-summary' --forceExit --detectOpenHandles --ci --reporters=default --reporters=jest-junit"
delta: 0.5
- name: Test Report
if: ${{ success() || failure() }}
uses: dorny/test-reporter@v1
with:
name: JEST Tests
path: junit.xml
reporter: jest-junit