File tree Expand file tree Collapse file tree 3 files changed +17
-15
lines changed
Expand file tree Collapse file tree 3 files changed +17
-15
lines changed Original file line number Diff line number Diff line change 77 runs-on : ubuntu-latest
88 strategy :
99 matrix :
10- node-version :
11- - 14
12- - 16
13- - 18
14- react : [16, 17]
10+ node : [14, 16, 18]
11+ react : [16, 17, 18]
1512
16- name : build (${{ matrix.node-version }} w/ React ${{ matrix.react }}
13+ name : build (${{ matrix.node }} w/ React ${{ matrix.react }}
1714
1815 steps :
1916 - uses : actions/checkout@v3
2017
21- - name : Use Node.js ${{ matrix.node-version }}
18+ - name : Use Node.js ${{ matrix.node }}
2219 uses : actions/setup-node@v3
2320 with :
24- node-version : ${{ matrix.node-version }}
21+ node-version : ${{ matrix.node }}
2522
2623 # Node 14 ships with npm@6 which doesn't install peerDeps by default.
2724 - name : Install npm@7
28- if : matrix.node-version == '14'
25+ if : matrix.node == '14'
2926 run : npm install -g npm@7
3027
3128 - name : Install deps
3229 run : npm ci
3330
34- - name : Install React 16
35- if : matrix.react == '16'
31+ - name : Install React ${{ matrix.react }}
3632 run : npm i react@${{ matrix.react }} react-dom@${{ matrix.react }}
3733
34+ # `@testing-library/react@13` dropped support for React 16 and 17 so to ensure that we run
35+ # fine under React 18 we should upgrade it if we're testing React 18.
36+ - name : Install testing-library react for React 18
37+ if : matrix.react == '18'
38+ run : npm i @testing-library/react@13
39+
3840 - name : Run tests
3941 run : npm test
Original file line number Diff line number Diff line change 2727 "prop-types" : " ^15.8.1"
2828 },
2929 "peerDependencies" : {
30- "react" : " 16.x || 17.x" ,
31- "react-dom" : " 16.x || 17.x"
30+ "react" : " 16.x || 17.x || 18.x " ,
31+ "react-dom" : " 16.x || 17.x || 18.x "
3232 },
3333 "devDependencies" : {
3434 "@babel/preset-env" : " ^7.16.11" ,
You can’t perform that action at this time.
0 commit comments