Add react@experimental testing (#23359)
This commit is contained in:
parent
c3390b8cca
commit
cb7ef3feb5
6 changed files with 69 additions and 1 deletions
55
.github/workflows/test_react_experimental.yml
vendored
Normal file
55
.github/workflows/test_react_experimental.yml
vendored
Normal file
|
@ -0,0 +1,55 @@
|
|||
on:
|
||||
schedule:
|
||||
# * is a special character in YAML so you have to quote this string
|
||||
- cron: '0 0,12 * * *'
|
||||
|
||||
name: Test react@experimental
|
||||
|
||||
jobs:
|
||||
# build:
|
||||
# runs-on: ubuntu-latest
|
||||
# steps:
|
||||
# - uses: actions/checkout@v2
|
||||
|
||||
# - run: yarn install --frozen-lockfile --check-files
|
||||
# env:
|
||||
# NEXT_TELEMETRY_DISABLED: 1
|
||||
|
||||
# - run: yarn upgrade react@next react-dom@next -W --dev
|
||||
|
||||
# - uses: actions/cache@v2
|
||||
# id: cache-build
|
||||
# with:
|
||||
# path: ./*
|
||||
# key: ${{ github.sha }}
|
||||
|
||||
testAll:
|
||||
name: Test All
|
||||
runs-on: ubuntu-latest
|
||||
# needs: build
|
||||
env:
|
||||
NEXT_TELEMETRY_DISABLED: 1
|
||||
NEXT_PRIVATE_REACT_MODE: concurrent
|
||||
HEADLESS: true
|
||||
NEXT_PRIVATE_SKIP_SIZE_TESTS: true
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
group: [1, 2, 3, 4, 5, 6]
|
||||
steps:
|
||||
# - uses: actions/cache@v2
|
||||
# id: restore-build
|
||||
# with:
|
||||
# path: ./*
|
||||
# key: ${{ github.sha }}
|
||||
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- run: yarn install --frozen-lockfile --check-files
|
||||
|
||||
- run: yarn upgrade react@experimental react-dom@experimental -W --dev
|
||||
|
||||
# TODO: remove after we fix watchpack watching too much
|
||||
- run: echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
|
||||
|
||||
- run: node run-tests.js --timings -g ${{ matrix.group }}/6 -c 3
|
1
.github/workflows/test_react_next.yml
vendored
1
.github/workflows/test_react_next.yml
vendored
|
@ -30,6 +30,7 @@ jobs:
|
|||
env:
|
||||
NEXT_TELEMETRY_DISABLED: 1
|
||||
HEADLESS: true
|
||||
NEXT_PRIVATE_SKIP_SIZE_TESTS: true
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
|
|
|
@ -104,7 +104,7 @@ export const defaultConfig: NextConfig = {
|
|||
plugins: false,
|
||||
profiling: false,
|
||||
sprFlushToDisk: true,
|
||||
reactMode: 'legacy',
|
||||
reactMode: (process.env.NEXT_PRIVATE_REACT_MODE as any) || 'legacy',
|
||||
workerThreads: false,
|
||||
pageEnv: false,
|
||||
optimizeImages: false,
|
||||
|
|
|
@ -40,6 +40,10 @@ describe('Build Output', () => {
|
|||
it('should not deviate from snapshot', async () => {
|
||||
console.log(stdout)
|
||||
|
||||
if (process.env.NEXT_PRIVATE_SKIP_SIZE_TESTS) {
|
||||
return
|
||||
}
|
||||
|
||||
const parsePageSize = (page) =>
|
||||
stdout.match(
|
||||
new RegExp(` ${page} .*?((?:\\d|\\.){1,} (?:\\w{1,})) `)
|
||||
|
|
|
@ -19,6 +19,10 @@ describe('Build Output', () => {
|
|||
})
|
||||
|
||||
it('should not include crypto', async () => {
|
||||
if (process.env.NEXT_PRIVATE_SKIP_SIZE_TESTS) {
|
||||
return
|
||||
}
|
||||
|
||||
;({ stdout } = await nextBuild(appDir, [], {
|
||||
stdout: true,
|
||||
}))
|
||||
|
|
|
@ -66,6 +66,10 @@ describe('Production response size', () => {
|
|||
})
|
||||
|
||||
it('should not increase the overall response size of default build', async () => {
|
||||
if (process.env.NEXT_PRIVATE_SKIP_SIZE_TESTS) {
|
||||
return
|
||||
}
|
||||
|
||||
const responseSizes = [
|
||||
baseResponseSize,
|
||||
...(await getResponseSizes(scriptsUrls)),
|
||||
|
|
Loading…
Reference in a new issue