Skip to content

Commit 891d533

Browse files
committed
test: add 100% coverage with codecov integration
1 parent 84edc6c commit 891d533

File tree

6 files changed

+771
-11
lines changed

6 files changed

+771
-11
lines changed

.github/workflows/ci.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,11 @@ jobs:
2424
- name: Install
2525
run: npm ci
2626

27-
- name: Test
28-
run: npm test
27+
- name: Test with coverage
28+
run: npm run test:coverage -- --coverageThreshold='{"global":{"branches":100,"functions":100,"lines":100,"statements":100}}' --coverageReporters=json-summary
29+
30+
- name: Upload coverage to Codecov
31+
uses: codecov/codecov-action@v5
32+
with:
33+
token: ${{ secrets.CODECOV_TOKEN }}
34+
fail_ci_if_error: false

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Element Picker – JavaScript HTML Element Picker Library
22

33
![CI](https://github.com/jamesbechet/element-picker/actions/workflows/ci.yml/badge.svg)
4+
[![codecov](https://codecov.io/gh/jamesbechet/element-picker/branch/master/graph/badge.svg)](https://codecov.io/gh/jamesbechet/element-picker)
45
[![npm][npm-image]][npm-url] [![downloads][downloads-image]][downloads-url]
56

67
[npm-image]: https://img.shields.io/npm/v/element-picker.svg

0 commit comments

Comments
 (0)