Skip to content

Commit 761f689

Browse files
Merge branch 'dev-javascript-patch-1'
2 parents fd0e4aa + c5db872 commit 761f689

File tree

3 files changed

+43
-4
lines changed

3 files changed

+43
-4
lines changed

.github/workflows/codecov.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Running Code Coverage
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
permissions:
9+
contents: write
10+
pull-requests: write
11+
12+
strategy:
13+
matrix:
14+
node-version: [14.x, 15.x, 16.x, 18.x]
15+
16+
steps:
17+
- name: Checkout repository
18+
uses: actions/checkout@v2
19+
with:
20+
# Fine-grained PAT with contents:write and workflows:write
21+
# scopes
22+
token: ${{ secrets.GITHUB_TOKEN }}
23+
24+
- name: Set up Node.js ${{ matrix.node-version }}
25+
uses: actions/setup-node@v1
26+
with:
27+
node-version: ${{ matrix.node-version }}
28+
29+
- name: Install dependencies
30+
run: npm install
31+
32+
- name: Run tests
33+
run: npm run test
34+
35+
- name: Upload coverage to Codecov
36+
uses: codecov/codecov-action@v1
37+
with:
38+
token: ${{ secrets.CODECOV_TOKEN }}

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1+
[![Test coverage](https://codecov.io/gh/dev-javascript/string-to-react-component/graph/badge.svg?token=GT1LU074L2)](https://codecov.io/gh/dev-javascript/string-to-react-component) [![NPM version](http://img.shields.io/npm/v/string-to-react-component.svg?style=flat-square)](http://npmjs.org/package/string-to-react-component) [![node](https://img.shields.io/badge/node.js-%3E=_8.0-green.svg?style=flat-square)](http://nodejs.org/download/) [![React](https://img.shields.io/badge/React-%3E=_16.8.0-green.svg?style=flat-square)](https://react.dev/) [![License](http://img.shields.io/npm/l/string-to-react-component.svg?style=flat-square)](LICENSE) [![npm download](https://img.shields.io/npm/dm/string-to-react-component.svg?style=flat-square)](https://npmjs.org/package/string-to-react-component) [![Build Status](https://travis-ci.org/ly-components/string-to-react-component.png)](https://travis-ci.org/ly-components/string-to-react-component)
2+
13
# string-to-react-component
24

35
Create React component from string
46

5-
> _Support react >= `v16.8.0`_
6-
77
## Table of Contents
88

99
<!-- toc -->

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"build:lib:esm-pf": "cross-env INCLUDE_POLYFILLS=true babel src/ --out-dir lib/esm-including-polyfills/ --extensions .ts,.tsx --ignore **/__tests__,**/__mocks__,**/*.test.js,**/*.js.snap,**/*.d.ts",
2828
"clean:lib": "rimraf lib",
2929
"clean:dist": "rimraf dist",
30-
"prepublish": "npm run build",
30+
"prepublishOnly": "npm run build",
3131
"test": "jest",
3232
"lint": "eslint src",
3333
"deploy": "gh-pages -d demo"
@@ -101,6 +101,7 @@
101101
"jest": {
102102
"setupFilesAfterEnv": [
103103
"jest-extended"
104-
]
104+
],
105+
"collectCoverage": true
105106
}
106107
}

0 commit comments

Comments
 (0)