diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index fb4b0c5f76..67278d6e9a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -43,6 +43,32 @@ jobs: path: dist - run: git reset HEAD --hard + typings: + needs: + - build + runs-on: ubuntu-latest + steps: + - name: Environment Information + run: npx envinfo + - name: Checkout + uses: actions/checkout@v3 + - name: Setup node + id: node + uses: actions/setup-node@v3 + with: + node-version: lts/hydrogen # 18 + cache: 'npm' + - run: npm clean-install + - name: Load cached dist + uses: actions/cache@v3 + id: dist + with: + path: dist + key: ${{ needs.build.outputs.cache-key }} + fail-on-cache-miss: true + - name: Check TypeScript type definitions + run: npm run test:types + node: needs: - build @@ -269,6 +295,7 @@ jobs: - edge-runtime - electron - node + - typings - workers runs-on: ubuntu-latest if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags') && github.repository == 'panva/jose' }} diff --git a/package.json b/package.json index 7189934160..7f70f3f605 100644 --- a/package.json +++ b/package.json @@ -125,7 +125,8 @@ "types:find": "find dist/types -name '*.d.ts' -type f -print0", "runtime:node:copy": "cp ./src/runtime/node/*.ts ./src/runtime", "runtime:refs": "run-s -s runtime:find | xargs -0 sed -i.bak -e \"s/'\\.\\.\\//'\\.\\//g\" -e \"s/'\\.\\/\\.\\./'../g\" && npm run-script sedcleanup", - "test": "ava && tsd -f test/types", + "test": "ava", + "test:types": "tsd -f test/types", "format": "prettier --loglevel silent --write ./test ./tap ./src ./tools ./cookbook", "tap:browsers": "./tap/.browsers.sh", "tap:bun": "./tap/.bun.sh",