From 7d5ccdc32c8a47620cc2c839e946b15bbd99f37e Mon Sep 17 00:00:00 2001 From: Leonardo Guarnieri de Bastiani Date: Tue, 16 Jan 2024 23:07:26 -0300 Subject: [PATCH] add test ci --- .eslintignore | 3 +++ .github/workflows/test.yml | 21 +++++++++++++++++++++ package.json | 2 +- 3 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/test.yml diff --git a/.eslintignore b/.eslintignore index f54646e..891be35 100644 --- a/.eslintignore +++ b/.eslintignore @@ -3,3 +3,6 @@ dist yarn-error.log *.json lib/ +example/ +playground/ +docs/ diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..29aafc4 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,21 @@ +name: Test +on: + push: + +jobs: + test: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - uses: actions/setup-node@v4 + with: + node-version: lts + + - run: yarn install --frozen-lockfile + + - run: yarn test + - run: yarn tsc + - run: yarn lint + - run: yarn tsd diff --git a/package.json b/package.json index e6e7db5..232d9bb 100644 --- a/package.json +++ b/package.json @@ -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",