File tree Expand file tree Collapse file tree 5 files changed +58
-2
lines changed
Expand file tree Collapse file tree 5 files changed +58
-2
lines changed Original file line number Diff line number Diff line change 4242 id : pnpm-install
4343 uses : pnpm/action-setup@v2
4444 with :
45- version : 7
4645 run_install : false
4746
4847 - name : Get pnpm store directory
Original file line number Diff line number Diff line change 3535 id : pnpm-install
3636 uses : pnpm/action-setup@v2
3737 with :
38- version : 7
3938 run_install : false
4039
4140 - name : Get pnpm store directory
Original file line number Diff line number Diff line change 1+ name : TypeScript Types
2+
3+ on :
4+ push :
5+ branches : [main]
6+ paths :
7+ - " **.ts"
8+ - " package.json"
9+ - " pnpm-lock.yaml"
10+ - " tsconfig.json"
11+ - " .github/workflows/typescript.yml"
12+ pull_request :
13+ branches : [main]
14+ paths :
15+ - " **.ts"
16+ - " package.json"
17+ - " pnpm-lock.yaml"
18+ - " tsconfig.json"
19+ - " .github/workflows/typescript.yml"
20+
21+ jobs :
22+ typescript :
23+ runs-on : ubuntu-latest
24+ steps :
25+ - uses : actions/checkout@v3
26+
27+ - name : Setup Node.js
28+ uses : actions/setup-node@v3
29+ with :
30+ node-version : 18
31+
32+ - name : Setup pnpm
33+ uses : pnpm/action-setup@v2
34+ with :
35+ run_install : false
36+
37+ - name : Get pnpm store directory
38+ id : pnpm-cache
39+ shell : bash
40+ run : |
41+ echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
42+
43+ - uses : actions/cache@v3
44+ name : Setup pnpm cache
45+ with :
46+ path : ${{ steps.pnpm-cache.outputs.STORE_PATH }}
47+ key : ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
48+ restore-keys : |
49+ ${{ runner.os }}-pnpm-store-
50+
51+ - name : Install dependencies
52+ run : pnpm i --frozen-lockfile
53+
54+ - name : Run TypeScript
55+ run : pnpm run lint:types
Original file line number Diff line number Diff line change 11pnpm run staged
2+ pnpm run lint:types
Original file line number Diff line number Diff line change 3333 "types" : " ./@type/index.d.ts" ,
3434 "scripts" : {
3535 "eslint" : " eslint src/**/*.ts" ,
36+ "lint:types" : " tsc --noEmit" ,
37+ "lint" : " pnpm eslint && pnpm lint:types" ,
3638 "staged" : " lint-staged" ,
3739 "coverage" : " c8 pnpm test" ,
3840 "ci" : " c8 pnpm test && c8 report --reporter=json" ,
You can’t perform that action at this time.
0 commit comments