-
Notifications
You must be signed in to change notification settings - Fork 1.4k
37 lines (29 loc) · 1.1 KB
/
jest-coverage.yml
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
name: Jest Coverage Check
on:
pull_request:
branches:
- develop
- main
- release/v*
jobs:
jest_coverage:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install dependencies
run: cd frontend && yarn install
- name: Run Jest with Coverage
run: cd frontend |
npx test --silent --coverageReporters text --coverageReporters text-summary --changedSince=origin/$BASE_BRANCH --passWithNoTests --listTests
npx test --silent --coverageReporters text --coverageReporters json-summary --changedSince=origin/$BASE_BRANCH --passWithNoTests --maxWorkers=5 --ci --testResultsProcessor="jest-junit"
yarn custom-coverage --verbose
- name: Upload Coverage Results
uses: actions/upload-artifact@v2
with:
name: coverage
path: ./frontend/coverage
- name: Display Coverage Summary
run: |
echo "Coverage Summary:"
cat coverage/lcov-report/index.html | grep -oP '(?<=<span class="strong">).*(?=%</span>)' | tail -n 1