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 42
42
id : pnpm-install
43
43
uses : pnpm/action-setup@v2
44
44
with :
45
- version : 7
46
45
run_install : false
47
46
48
47
- name : Get pnpm store directory
Original file line number Diff line number Diff line change 35
35
id : pnpm-install
36
36
uses : pnpm/action-setup@v2
37
37
with :
38
- version : 7
39
38
run_install : false
40
39
41
40
- 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 1
1
pnpm run staged
2
+ pnpm run lint:types
Original file line number Diff line number Diff line change 33
33
"types" : " ./@type/index.d.ts" ,
34
34
"scripts" : {
35
35
"eslint" : " eslint src/**/*.ts" ,
36
+ "lint:types" : " tsc --noEmit" ,
37
+ "lint" : " pnpm eslint && pnpm lint:types" ,
36
38
"staged" : " lint-staged" ,
37
39
"coverage" : " c8 pnpm test" ,
38
40
"ci" : " c8 pnpm test && c8 report --reporter=json" ,
You can’t perform that action at this time.
0 commit comments