Skip to content

Commit f49594b

Browse files
committed
Test against multiple versions of React
1 parent 170f64c commit f49594b

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

.github/workflows/validate.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ jobs:
1717
strategy:
1818
matrix:
1919
node: [12.13, 12, 14, 16]
20+
react: [16.9.0, ^16, ^17]
2021
runs-on: ubuntu-latest
2122
steps:
2223
- name: 🛑 Cancel Previous Runs
@@ -37,6 +38,9 @@ jobs:
3738
env:
3839
HUSKY_SKIP_INSTALL: true
3940

41+
- name: Use React version
42+
run: npm install --save-dev react@"${{ matrix.react }}" react-dom@"${{ matrix.react }}" react-test-renderer@"${{ matrix.react }}"
43+
4044
- name: ▶️ Run validate script
4145
run: npm run validate
4246

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
"scripts": {
3434
"setup": "npm install && npm run validate -s",
3535
"validate": "kcd-scripts validate",
36-
"prepare": "npm run build",
3736
"build": "kcd-scripts build --out-dir lib && npm run generate:submodules",
3837
"generate:submodules": "ts-node scripts/generate-submodules.ts",
3938
"test": "kcd-scripts test",
@@ -43,7 +42,8 @@
4342
"coverage": "codecov",
4443
"docs:dev": "docz dev",
4544
"docs:build": "docz build",
46-
"contributors:add": "all-contributors add"
45+
"contributors:add": "all-contributors add",
46+
"install-16": "npm install --save-dev react@\"^16.9.0\" react-dom@\"^16.9.0\" react-test-renderer@\"^16.9.0\"",
4747
},
4848
"dependencies": {
4949
"@babel/runtime": "^7.12.5",
@@ -64,7 +64,7 @@
6464
"kcd-scripts": "11.2.0",
6565
"prettier": "^2.2.1",
6666
"react": "17.0.2",
67-
"react-dom": "^17.0.1",
67+
"react-dom": "17.0.2",
6868
"react-test-renderer": "17.0.2",
6969
"ts-node": "^10.0.0",
7070
"typescript": "4.3.5"

0 commit comments

Comments
 (0)