File tree Expand file tree Collapse file tree 4 files changed +104
-2043
lines changed Expand file tree Collapse file tree 4 files changed +104
-2043
lines changed Original file line number Diff line number Diff line change 1
1
name : CI
2
- on : [push]
2
+ on :
3
+ push :
4
+ branches :
5
+ - master
6
+ - beta
7
+ - 1.x
8
+ pull_request :
9
+ paths-ignore :
10
+ - ' .gitignore'
11
+ - ' .npmignore'
12
+ - ' *.md'
13
+
3
14
jobs :
4
15
build :
16
+ name : Lint, and test on Node ${{ matrix.node }} and ${{ matrix.os }}
5
17
runs-on : ubuntu-latest
6
- strategy :
7
- matrix :
8
- node-version : [12.x]
18
+
9
19
steps :
10
- - uses : actions/checkout@v2
11
- - name : Use Node.js ${{ matrix.node-version }}
20
+ - name : Checkout repo
21
+ uses : actions/checkout@v2
22
+
23
+ - name : Use Node ${{ matrix.node }}
12
24
uses : actions/setup-node@v1
13
25
with :
14
- node-version : ${{ matrix.node-version }}
15
- - name : Install dependencies
16
- run : yarn install --frozen-lockfile
26
+ node-version : ${{ matrix.node }}
27
+
28
+ - name : Install deps and build (with cache)
29
+ uses : bahmutov/npm-install@v1
30
+
17
31
- name : Lint
18
32
run : |
19
- npm run lint:types
20
- npm run lint
33
+ yarn lint
34
+ yarn lint:types
35
+
21
36
- name : Test
22
- run : npm test
23
- env :
24
- CI : true
37
+ run : yarn test --ci
38
+
25
39
- name : Build
26
- run : npm run build
40
+ run : yarn build
41
+
42
+ publish-module :
43
+ name : ' Publish Module to NPM on Node ${{ matrix.node }} and ${{ matrix.os }}'
44
+ needs : build
45
+ if : github.repository == 'react-hook-form/resolvers' && (github.ref =='refs/heads/master' || github.ref == 'refs/heads/1.x')
46
+ runs-on : ubuntu-latest
47
+ steps :
48
+ - name : Checkout repo
49
+ uses : actions/checkout@v2
50
+ - name : ' Use Node ${{ matrix.node }}'
51
+ uses : actions/setup-node@v1
52
+ with :
53
+ node-version : ' ${{ matrix.node }}'
54
+ registry-url : ' https://registry.npmjs.org/'
55
+ - name : Install dependencies
56
+ uses : bahmutov/npm-install@v1
57
+ - name : Build
58
+ run : yarn build
59
+ - name : Publish
60
+ run : npx semantic-release
61
+ env :
62
+ NODE_AUTH_TOKEN : ' ${{secrets.NPM_TOKEN}}'
63
+ GITHUB_TOKEN : ' ${{secrets.GITHUB_TOKEN}}'
Original file line number Diff line number Diff line change 1
- name : size
1
+ name : Compressed Size
2
+
2
3
on : [pull_request]
4
+
3
5
jobs :
4
- size :
6
+ build :
5
7
runs-on : ubuntu-latest
6
- env :
7
- CI_JOB_NUMBER : 1
8
+
8
9
steps :
9
- - uses : actions/checkout@v1
10
- - uses : andresz1/ size-limit- action@v1
10
+ - uses : actions/checkout@v2
11
+ - uses : preactjs/compressed- size-action@v2
11
12
with :
12
- github_token : ${{ secrets.GITHUB_TOKEN }}
13
+ repo-token : ' ${{ secrets.GITHUB_TOKEN }}'
Original file line number Diff line number Diff line change 66
66
},
67
67
"homepage" : " https://react-hook-form.com" ,
68
68
"devDependencies" : {
69
- "@size-limit/preset-small-lib" : " ^4.9.0" ,
70
69
"@testing-library/react" : " ^11.2.2" ,
71
- "@testing-library/react-hooks" : " ^3.4.2" ,
72
70
"@types/jest" : " ^26.0.15" ,
73
71
"@types/react" : " ^17.0.0" ,
74
72
"@types/react-dom" : " ^17.0.0" ,
75
- "@types/react-test-renderer" : " ^17.0.0" ,
76
73
"@typescript-eslint/eslint-plugin" : " ^4.8.1" ,
77
74
"@typescript-eslint/parser" : " ^4.8.1" ,
78
75
"eslint" : " ^7.14.0" ,
88
85
"react" : " ^17.0.1" ,
89
86
"react-dom" : " ^17.0.1" ,
90
87
"react-hook-form" : " ^6.11.4" ,
91
- "react-test-renderer" : " ^17.0.1" ,
92
88
"rimraf" : " ^3.0.2" ,
93
- "size-limit" : " ^4.9.0" ,
94
89
"ts-jest" : " ^26.4.4" ,
95
90
"typescript" : " ^4.1.2"
96
91
},
You can’t perform that action at this time.
0 commit comments