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 6f85d11
Show file tree
Hide file tree
Showing 4 changed files with 25 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/
20 changes: 20 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
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 build
- 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 6f85d11

Please sign in to comment.