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 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",