Skip to content

Commit edb55fc

Browse files
authored
test: fix tsc in action (#1140)
1 parent dc8807f commit edb55fc

File tree

3 files changed

+40
-30
lines changed

3 files changed

+40
-30
lines changed

.github/workflows/main.yml

Lines changed: 37 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@ jobs:
1111
runs-on: ubuntu-latest
1212
steps:
1313
- name: checkout
14-
uses: actions/checkout@master
14+
uses: actions/checkout@v4
1515

16-
- uses: actions/setup-node@v1
16+
- uses: actions/setup-node@v4
1717
with:
18-
node-version: '16'
18+
node-version: '20'
1919

2020
- name: cache package-lock.json
21-
uses: actions/cache@v2
21+
uses: actions/cache@v4
2222
with:
2323
path: package-temp-dir
2424
key: lock-${{ github.sha }}
@@ -34,7 +34,7 @@ jobs:
3434
cp package-lock.json package-temp-dir
3535
- name: cache node_modules
3636
id: node_modules_cache_id
37-
uses: actions/cache@v2
37+
uses: actions/cache@v4
3838
with:
3939
path: node_modules
4040
key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }}
@@ -47,16 +47,16 @@ jobs:
4747
runs-on: ubuntu-latest
4848
steps:
4949
- name: checkout
50-
uses: actions/checkout@master
50+
uses: actions/checkout@v4
5151

5252
- name: restore cache from package-lock.json
53-
uses: actions/cache@v2
53+
uses: actions/cache@v4
5454
with:
5555
path: package-temp-dir
5656
key: lock-${{ github.sha }}
5757

5858
- name: restore cache from node_modules
59-
uses: actions/cache@v2
59+
uses: actions/cache@v4
6060
with:
6161
path: node_modules
6262
key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }}
@@ -66,20 +66,43 @@ jobs:
6666

6767
needs: setup
6868

69+
tsc:
70+
runs-on: ubuntu-latest
71+
steps:
72+
- name: checkout
73+
uses: actions/checkout@v4
74+
75+
- name: restore cache from package-lock.json
76+
uses: actions/cache@v4
77+
with:
78+
path: package-temp-dir
79+
key: lock-${{ github.sha }}
80+
81+
- name: restore cache from node_modules
82+
uses: actions/cache@v4
83+
with:
84+
path: node_modules
85+
key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }}
86+
87+
- name: tsc
88+
run: npm run tsc
89+
90+
needs: setup
91+
6992
compile:
7093
runs-on: ubuntu-latest
7194
steps:
7295
- name: checkout
73-
uses: actions/checkout@master
96+
uses: actions/checkout@v4
7497

7598
- name: restore cache from package-lock.json
76-
uses: actions/cache@v2
99+
uses: actions/cache@v4
77100
with:
78101
path: package-temp-dir
79102
key: lock-${{ github.sha }}
80103

81104
- name: restore cache from node_modules
82-
uses: actions/cache@v2
105+
uses: actions/cache@v4
83106
with:
84107
path: node_modules
85108
key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }}
@@ -93,16 +116,16 @@ jobs:
93116
runs-on: ubuntu-latest
94117
steps:
95118
- name: checkout
96-
uses: actions/checkout@master
119+
uses: actions/checkout@v4
97120

98121
- name: restore cache from package-lock.json
99-
uses: actions/cache@v2
122+
uses: actions/cache@v4
100123
with:
101124
path: package-temp-dir
102125
key: lock-${{ github.sha }}
103126

104127
- name: restore cache from node_modules
105-
uses: actions/cache@v2
128+
uses: actions/cache@v4
106129
with:
107130
path: node_modules
108131
key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }}

docs/examples/shadow.tsx

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ interface DataType {
1616
gender: string;
1717
}
1818

19-
const columns: TableProps['columns'] = [
19+
const columns: ColumnsType<any> = [
2020
{
2121
title: 'Other',
2222
fixed: 'left',
@@ -29,7 +29,6 @@ const columns: TableProps['columns'] = [
2929
width: 150,
3030
fixed: 'left',
3131
ellipsis: true,
32-
sorter: (a, b) => a.age - b.age,
3332
},
3433
{
3534
title: 'Address',
@@ -72,17 +71,6 @@ const columns: TableProps['columns'] = [
7271
dataIndex: 'name',
7372
key: 'name',
7473
width: 100,
75-
filters: [
76-
{
77-
text: 'Joe',
78-
value: 'Joe',
79-
},
80-
{
81-
text: 'John',
82-
value: 'John',
83-
},
84-
],
85-
onFilter: (value: string, record) => record.name.indexOf(value) === 0,
8674
},
8775
{
8876
title: 'Company',

package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
"coverage": "vitest run --coverage",
4545
"prepublishOnly": "npm run compile && np --no-cleanup --yolo --no-publish",
4646
"lint": "eslint src/ --ext .tsx,.ts",
47-
"lint:tsc": "tsc -p tsconfig.json --noEmit",
47+
"tsc": "tsc -p tsconfig.json --noEmit",
4848
"now-build": "npm run docs:build",
4949
"prepare": "husky install"
5050
},
@@ -108,8 +108,7 @@
108108
},
109109
"lint-staged": {
110110
"**/*.{js,jsx,tsx,ts,md,json}": [
111-
"prettier --write",
112-
"git add"
111+
"prettier --write"
113112
]
114113
}
115114
}

0 commit comments

Comments
 (0)