Skip to content

Commit ea6f2df

Browse files
committed
Test forwards & latest compatibility action
1 parent 9be4331 commit ea6f2df

File tree

3 files changed

+62
-3
lines changed

3 files changed

+62
-3
lines changed

.github/workflows/forwards.yml

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Test compatiblity with react@next
2+
3+
on: [push]
4+
5+
jobs:
6+
build:
7+
name: Test on node ${{ matrix.node_version }} and ${{ matrix.os }}
8+
runs-on: ${{ matrix.os }}
9+
strategy:
10+
matrix:
11+
os: [ubuntu-latest]
12+
node: [10]
13+
steps:
14+
- uses: actions/setup-node@v1
15+
with:
16+
node-version: "10.x"
17+
- uses: actions/checkout@v1
18+
- name: Cache node modules
19+
id: cache-modules
20+
uses: actions/cache@v1
21+
with:
22+
path: node_modules
23+
key: ${{ runner.OS }}-buildForwards-${{ hashFiles('**/package.json') }}
24+
restore-keys: |
25+
${{ runner.OS }}-buildForwards-${{ env.cache-name }}-
26+
${{ runner.OS }}-buildForwards-
27+
- name: Install
28+
if: steps.cache-modules.outputs.cache-hit != 'true'
29+
run: yarn add -D -W react@next react-dom@next
30+
- name: Test
31+
run: yarn test

.github/workflows/latest.yml

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Test compatiblity with react@latest
2+
3+
on: [push]
4+
5+
jobs:
6+
build:
7+
name: Test on node ${{ matrix.node_version }} and ${{ matrix.os }}
8+
runs-on: ${{ matrix.os }}
9+
strategy:
10+
matrix:
11+
os: [ubuntu-latest]
12+
node: [10]
13+
steps:
14+
- uses: actions/setup-node@v1
15+
with:
16+
node-version: "10.x"
17+
- uses: actions/checkout@v1
18+
- name: Cache node modules
19+
id: cache-modules
20+
uses: actions/cache@v1
21+
with:
22+
path: node_modules
23+
key: ${{ runner.OS }}-buildLatest-${{ hashFiles('**/package.json') }}
24+
restore-keys: |
25+
${{ runner.OS }}-buildLatest-${{ env.cache-name }}-
26+
${{ runner.OS }}-buildLatest-
27+
- name: Install
28+
if: steps.cache-modules.outputs.cache-hit != 'true'
29+
run: yarn add -D -W react@latest react-dom@latest
30+
- name: Test
31+
run: yarn test

package.json

-3
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,6 @@
2020
"test:watch": "yarn test -- --watch",
2121
"test:devtools": "jest react-async-devtools/src",
2222
"test:components": "jest src/Async.spec.js --collectCoverageFrom=src/Async.js",
23-
"test:forwards": "yarn add -D -W react@next react-dom@next && yarn resolutions:fix-react && yarn test",
24-
"test:latest": "yarn add -D -W react@latest react-dom@latest && yarn resolutions:fix-react && yarn test",
25-
"test:compat": "yarn test:backwards && yarn test:forwards && yarn test:latest",
2623
"test:examples": "CI=1 lerna run --scope '*-example' test -- --passWithNoTests --watchAll=false",
2724
"test:chromatic": "chromatic --app-code iiua39bmt0j --build-script-name build:storybook --exit-zero-on-changes",
2825
"ci": "yarn lint && yarn test:compat && yarn test:examples",

0 commit comments

Comments
 (0)