-
-
Notifications
You must be signed in to change notification settings - Fork 1
39 lines (33 loc) · 1 KB
/
coverage.yml
File metadata and controls
39 lines (33 loc) · 1 KB
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
name: 'Coverage'
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
test:
runs-on: ubuntu-latest
permissions:
actions: write
checks: write
contents: write
discussions: write
pages: write
pull-requests: write
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install dependencies
run: npm install
- name: Run tests with coverage
run: npm test -- --ci --json --coverage --coverageReporters=lcov --outputFile=coverage/report.json
- name: Generate Jest Coverage Report (Without Running Tests Again)
uses: ArtiomTr/jest-coverage-report-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
coverage-file: coverage/report.json # Use JSON format
- name: Upload coverage to Coveralls
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: coverage/lcov.info