From dac4a60f023a641efb43c9919a30362a53f8f3de Mon Sep 17 00:00:00 2001 From: "Haochen M. Kotoi-Xie" Date: Tue, 23 Jan 2024 05:24:17 +0900 Subject: [PATCH 1/2] package.json - fix typecheck script --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index ab87957..8c1442e 100644 --- a/package.json +++ b/package.json @@ -5,11 +5,11 @@ "scripts": { "build": "tsup", "lint": "eslint ." , - "typecheck": "tsc -p tsconfig.json" , + "typecheck": "rm -rf _tsout && tsc -p tsconfig.lib.json && tsc -p tsconfig.test.json && tsc -p tsconfig.json" , "verify": "yarn build && yarn test && yarn lint && yarn typecheck" , "dev": "tsup --watch", "test": "jest", - "clean": "rm -rf dist node_modules" + "clean": "rm -rf dist node_modules _tsout" }, "main": "dist/index.js", "types": "./dist/index.d.ts", From 931ac5b4470482f70c1175f109cd3acc7086e8ec Mon Sep 17 00:00:00 2001 From: "Haochen M. Kotoi-Xie" Date: Tue, 23 Jan 2024 05:20:40 +0900 Subject: [PATCH 2/2] add .github/workflows/verify.yml --- .github/workflows/verify.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/verify.yml diff --git a/.github/workflows/verify.yml b/.github/workflows/verify.yml new file mode 100644 index 0000000..6edab90 --- /dev/null +++ b/.github/workflows/verify.yml @@ -0,0 +1,29 @@ +name: verify + +on: + push: + pull_request: + +jobs: + verify: + runs-on: ubuntu-latest + timeout-minutes: 10 + steps: + - uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version: 18.x + + - name: Cache node_modules + uses: actions/cache@v3 + with: + path: node_modules + key: v1-${{ runner.os }}-${{ hashFiles('yarn.lock') }} + + - name: Run yarn install + run: yarn install --frozen-lockfile + + - name: Run verify + run: yarn verify