Skip to content

Commit

Permalink
ci,test: separate type tests
Browse files Browse the repository at this point in the history
  • Loading branch information
panva committed Feb 28, 2023
1 parent f5f6ed2 commit 128b3e9
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 1 deletion.
27 changes: 27 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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' }}
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 128b3e9

Please sign in to comment.