Skip to content

Commit 388d193

Browse files
chore - update workflows (#10)
* chore(workflows): updating workflows to allows coverage and badges * chore(docs): updating docs * chore(workflow): updating workflow adding test info
1 parent a27fdec commit 388d193

File tree

5 files changed

+36
-3
lines changed

5 files changed

+36
-3
lines changed

.github/workflows/ci.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,14 @@ jobs:
4646
- name: Run unit tests
4747
run: yarn test --maxWorkers=2 --coverage
4848

49+
- name: Upload coverage reports to Codecov
50+
uses: codecov/codecov-action@v5
51+
with:
52+
token: ${{ secrets.CODECOV_TOKEN }}
53+
file: ./coverage/lcov.info
54+
flags: unittests
55+
fail_ci_if_error: false
56+
4957
build-library:
5058
runs-on: ubuntu-latest
5159

.github/workflows/prerelease.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ jobs:
5959
run: yarn prepare
6060

6161
- name: Run tests
62-
run: yarn test --coverage --coverageReporters=json-summary,lcov,text --maxWorkers=2
62+
run: yarn test --coverage --maxWorkers=2
6363

6464
- name: Upload coverage artifact
6565
if: always()
@@ -70,6 +70,15 @@ jobs:
7070
coverage/**
7171
if-no-files-found: warn
7272

73+
- name: Upload coverage reports to Codecov
74+
if: always()
75+
uses: codecov/codecov-action@v5
76+
with:
77+
token: ${{ secrets.CODECOV_TOKEN }}
78+
file: ./coverage/lcov.info
79+
flags: prerelease
80+
fail_ci_if_error: false
81+
7382
- name: Publish coverage summary
7483
if: always()
7584
run: |

.github/workflows/publish.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ jobs:
6363

6464
- name: Run tests
6565
if: steps.version-check.outputs.version_changed == 'true'
66-
run: yarn test --coverage --coverageReporters=json-summary,lcov,text --maxWorkers=2
66+
run: yarn test --coverage --maxWorkers=2
6767

6868
- name: Upload coverage artifact
6969
if: always()
@@ -74,6 +74,15 @@ jobs:
7474
coverage/**
7575
if-no-files-found: warn
7676

77+
- name: Upload coverage reports to Codecov
78+
if: always()
79+
uses: codecov/codecov-action@v5
80+
with:
81+
token: ${{ secrets.CODECOV_TOKEN }}
82+
file: ./coverage/lcov.info
83+
flags: release
84+
fail_ci_if_error: false
85+
7786
- name: Publish coverage summary
7887
if: always()
7988
run: |

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
[![NPM Beta](https://img.shields.io/npm/v/%40gabriel-sisjr%2Freact-native-background-location/beta)](https://www.npmjs.com/package/@gabriel-sisjr/react-native-background-location/v/beta)
55
[![NPM Downloads](https://img.shields.io/npm/dm/%40gabriel-sisjr%2Freact-native-background-location)](https://www.npmjs.com/package/@gabriel-sisjr/react-native-background-location)
66
[![NPM Total Downloads](https://img.shields.io/npm/dt/%40gabriel-sisjr%2Freact-native-background-location)](https://www.npmjs.com/package/@gabriel-sisjr/react-native-background-location)
7+
[![CI Tests](https://github.com/gabriel-sisjr/react-native-background-location/actions/workflows/ci.yml/badge.svg)](https://github.com/gabriel-sisjr/react-native-background-location/actions/workflows/ci.yml)
8+
[![Code Coverage](https://codecov.io/gh/gabriel-sisjr/react-native-background-location/branch/develop/graph/badge.svg)](https://codecov.io/gh/gabriel-sisjr/react-native-background-location)
79
[![Pre-release CI](https://github.com/gabriel-sisjr/react-native-background-location/actions/workflows/prerelease.yml/badge.svg?branch=develop&label=Pre-release)](https://github.com/gabriel-sisjr/react-native-background-location/actions/workflows/prerelease.yml)
810
[![Release CI](https://github.com/gabriel-sisjr/react-native-background-location/actions/workflows/publish.yml/badge.svg?branch=main&label=Release)](https://github.com/gabriel-sisjr/react-native-background-location/actions/workflows/publish.yml)
911
[![GitHub Stars](https://img.shields.io/github/stars/gabriel-sisjr/react-native-background-location)](https://github.com/gabriel-sisjr/react-native-background-location/stargazers)
@@ -16,7 +18,7 @@
1618

1719
A React Native library for tracking location in the background using TurboModules (New Architecture). Track user location even when the app is minimized or in the background.
1820

19-
![Tracking demo](docs/assets/tracking.gif)
21+
<video src="docs/assets/tracking.mp4" controls muted playsinline loop width="100%"></video>
2022

2123
## Features
2224

package.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,11 @@
138138
"!src/__tests__/**",
139139
"!src/**/*.d.ts"
140140
],
141+
"coverageReporters": [
142+
"json-summary",
143+
"lcov",
144+
"text"
145+
],
141146
"coverageThreshold": {
142147
"global": {
143148
"branches": 0,

0 commit comments

Comments
 (0)