Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support React 18 #677

Merged
merged 15 commits into from
Nov 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 5 additions & 9 deletions .github/workflows/main.yml → .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
name: CI
name: Check
on: [pull_request]
jobs:
build:
check:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [10.x, 12.x]
node-version: [16.x]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
Expand All @@ -18,9 +18,5 @@ jobs:
run: |
npm run lint:types
npm run lint
- name: Test
run: npm test
env:
CI: true
- name: Build
run: npm run build
47 changes: 47 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Test
on: [pull_request]
jobs:
react-16-17:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x]
react-version: [^16.8.0, ^17]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: npm ci
- name: Install React ${{ matrix.react-version }}
run: |
npm install --D --legacy-peer-deps \
react@${{ matrix.react-version }} \
react-test-renderer@${{ matrix.react-version }} \
@testing-library/react@12 \
@testing-library/react-hooks
- name: Replace @testing-library/react with @testing-library/react-hooks
run: npx replace@1.2.2 '@testing-library/react' '@testing-library/react-hooks' tests -r
- name: Test
run: npm test
env:
CI: true
react-18:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: npm ci
- name: Test
run: npm test
env:
CI: true
Loading