Skip to content

Commit

Permalink
add test ci
Browse files Browse the repository at this point in the history
  • Loading branch information
leobastiani committed Jan 17, 2024
1 parent 434f830 commit fa6e1df
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,6 @@ dist
yarn-error.log
*.json
lib/
example/
playground/
docs/
19 changes: 19 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Test
on:
push:

jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- uses: actions/setup-node@v4

- run: yarn install --frozen-lockfile

- run: yarn test
- run: yarn tsc
- run: yarn lint
- run: yarn tsd
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
**Type safe** and **Zero-cost** React library to work with higher-order components (HOCs)

[![NPM version](https://img.shields.io/npm/v/react-with-hoc)](https://www.npmjs.com/package/react-with-hoc)
[![Build](https://github.com/leobastiani/react-with-hoc/actions/workflows/publish.yml/badge.svg)](https://github.com/leobastiani/react-with-hoc/actions/workflows/publish.yml)
[![Build](https://github.com/leobastiani/react-with-hoc/actions/workflows/test.yml/badge.svg)](https://github.com/leobastiani/react-with-hoc/actions/workflows/test.yml)
![Typescript](https://img.shields.io/npm/types/react-with-hoc)
[![Bundle size](https://img.shields.io/bundlephobia/minzip/react-with-hoc)](https://bundlephobia.com/package/react-with-hoc)
[![Bundle dependency](https://badgen.net/bundlephobia/dependency-count/react-with-hoc)](https://www.npmjs.com/package/react-with-hoc?activeTab=dependencies)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"build": "yarn clean && bin/build-cjs && bin/build-esm && yarn build:types && bin/generate-mappings",
"build:types": "npx tsc --outDir lib/module --emitDeclarationOnly --project tsconfig.build.json",
"clean": "rimraf lib",
"lint": "eslint . --max-warnings=0",
"lint": "eslint . --max-warnings=0 --report-unused-disable-directives",
"prepublishOnly": "yarn clean && yarn build && yarn test && yarn tsc && yarn lint && yarn tsd",
"test": "jest",
"tsc": "tsc --noEmit",
Expand Down

0 comments on commit fa6e1df

Please sign in to comment.