Skip to content

Commit 9be4331

Browse files
committed
Test backwards compatibility action
1 parent 39a9759 commit 9be4331

File tree

2 files changed

+32
-4
lines changed

2 files changed

+32
-4
lines changed

.github/workflows/backwards.yml

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Test backwards compatiblity
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 }}-buildBackwards-${{ hashFiles('**/package.json') }}
24+
restore-keys: |
25+
${{ runner.OS }}-buildBackwards-${{ env.cache-name }}-
26+
${{ runner.OS }}-buildBackwards-
27+
- name: Install
28+
if: steps.cache-modules.outputs.cache-hit != 'true'
29+
30+
- name: Test
31+
run: yarn test:components

package.json

+1-4
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,11 @@
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:backwards": "yarn add -D -W [email protected] [email protected] && yarn resolutions:fix-react && yarn test:components",
2423
"test:forwards": "yarn add -D -W react@next react-dom@next && yarn resolutions:fix-react && yarn test",
2524
"test:latest": "yarn add -D -W react@latest react-dom@latest && yarn resolutions:fix-react && yarn test",
2625
"test:compat": "yarn test:backwards && yarn test:forwards && yarn test:latest",
2726
"test:examples": "CI=1 lerna run --scope '*-example' test -- --passWithNoTests --watchAll=false",
2827
"test:chromatic": "chromatic --app-code iiua39bmt0j --build-script-name build:storybook --exit-zero-on-changes",
29-
"resolutions:fix-react": "jq '.resolutions.react = .devDependencies.react|.resolutions.\"react-dom\"=.devDependencies.react' package.json > package.json.new && mv package.json.new package.json && yarn install",
3028
"ci": "yarn lint && yarn test:compat && yarn test:examples",
3129
"build:packages": "lerna run --scope 'react-async*' build",
3230
"build:examples": "lerna run --scope '*-example' build",
@@ -69,7 +67,6 @@
6967
"eslint-plugin-react-hooks": "2.3.0",
7068
"jest": "24.9.0",
7169
"lerna": "3.19.0",
72-
"node-jq": "1.11.0",
7370
"now": "16.6.3",
7471
"npm-run-all": "4.1.5",
7572
"prettier": "1.19.1",
@@ -83,4 +80,4 @@
8380
"resolutions": {
8481
"@types/react": "16.9.13"
8582
}
86-
}
83+
}

0 commit comments

Comments
 (0)