Skip to content

Commit 4c4a63c

Browse files
committed
check TS
1 parent f5b10da commit 4c4a63c

File tree

4 files changed

+71
-122
lines changed

4 files changed

+71
-122
lines changed

.github/workflows/ci.yml

-120
This file was deleted.

.github/workflows/playwright.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: "Run Playwright tests"
1+
name: "Playwright Tests"
22

33
on:
44
pull_request:

.github/workflows/typescript.yml

+68
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: TypeScript Check
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- 'releases/*'
8+
pull_request:
9+
branches:
10+
- main
11+
- 'releases/*'
12+
workflow_dispatch:
13+
14+
jobs:
15+
type-check:
16+
name: Run TypeScript Check for idb-cache
17+
runs-on: ubuntu-22.04
18+
19+
steps:
20+
# 1: Checkout the repository
21+
- uses: actions/checkout@v4
22+
23+
# 2: Setup pnpm using the official action
24+
- name: Setup pnpm
25+
uses: pnpm/action-setup@v4
26+
with:
27+
version: 9.8.1 # Specify the desired pnpm version
28+
29+
# 2. Setup Node.js
30+
- name: Setup Node.js
31+
uses: actions/setup-node@v3
32+
with:
33+
node-version: '20'
34+
35+
# 3. Setup pnpm
36+
- name: Setup pnpm
37+
uses: pnpm/action-setup@v2
38+
with:
39+
version: 7.x
40+
41+
# 4: Cache pnpm dependencies (pnpm store and node_modules)
42+
- name: Cache pnpm dependencies
43+
uses: actions/cache@v3
44+
with:
45+
path: |
46+
~/.pnpm-store
47+
node_modules
48+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
49+
restore-keys: |
50+
${{ runner.os }}-pnpm-store-
51+
52+
# 5: Install dependencies
53+
- name: Install dependencies
54+
run: pnpm install
55+
56+
# 6: Run TypeScript Check and Save Logs
57+
- name: Run TypeScript Check
58+
run: |
59+
mkdir -p logs
60+
pnpm --filter packages/idb-cache typescript:check > logs/typescript-errors.log 2>&1 || true
61+
62+
# 7: Upload TypeScript Logs (on failure)
63+
- name: Upload TypeScript Logs
64+
if: failure()
65+
uses: actions/upload-artifact@v3
66+
with:
67+
name: typescript-errors
68+
path: logs/typescript-errors.log

packages/idb-cache/package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@
2323
"scripts": {
2424
"build": "rslib build",
2525
"dev": "rslib build --watch",
26-
"biome:check": "biome check . --write"
26+
"biome:check": "biome check . --write",
27+
"typescript:check": "tsc --noEmit"
2728
},
2829
"peerDependencies": {
2930
"@rslib/core": "^0.0.15"

0 commit comments

Comments
 (0)