Skip to content

Run DevTools tests against npm releases#19377

Draft
acdlite wants to merge 1 commit intofacebook:mainfrom
acdlite:devtools-release-test
Draft

Run DevTools tests against npm releases#19377
acdlite wants to merge 1 commit intofacebook:mainfrom
acdlite:devtools-release-test

Conversation

@acdlite
Copy link
Collaborator

@acdlite acdlite commented Jul 15, 2020

WIP

Adds a CircleCI job that runs the DevTools tests against a given version of React.

@codesandbox-ci
Copy link

codesandbox-ci bot commented Jul 15, 2020

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 83b14f1:

Sandbox Source
React Configuration

@sizebot
Copy link

sizebot commented Jul 15, 2020

No significant bundle size changes to report.

Size changes (experimental)

Generated by 🚫 dangerJS against 83b14f1

@sizebot
Copy link

sizebot commented Jul 15, 2020

No significant bundle size changes to report.

Size changes (stable)

Generated by 🚫 dangerJS against 83b14f1

@facebook-github-bot facebook-github-bot added CLA Signed React Core Team Opened by a member of the React Core Team labels Jul 15, 2020
@acdlite acdlite force-pushed the devtools-release-test branch 4 times, most recently from 849ae4e to 4c3ec92 Compare July 16, 2020 19:20
Adds a CircleCI job that runs the DevTools tests against a given version
of React.
@acdlite acdlite force-pushed the devtools-release-test branch from 4c3ec92 to 3a51d49 Compare July 16, 2020 21:01
@acdlite
Copy link
Collaborator Author

acdlite commented Jul 16, 2020

@bvaughn This works but the tests don't actually pass. Some of them are implementation details, though, and I'm not sure how important they are.

Maybe before landing this, I can set up the @gate pragma and we can skip the ones that we don't care about? Could also gate using version number.

@acdlite
Copy link
Collaborator Author

acdlite commented Jul 16, 2020

Or I could land this now and make it so it's not push blocking. I was thinking we'd want to do that anyway so we don't slow down unrelated PRs. We can run it on a cron schedule instead.

@acdlite acdlite force-pushed the devtools-release-test branch from 3a51d49 to 83b14f1 Compare July 16, 2020 22:07
@bvaughn
Copy link
Contributor

bvaughn commented Jul 17, 2020

Could also gate using version number.

Yeah, gating by version number seems really helpful for this.

Or I could land this now and make it so it's not push blocking. I was thinking we'd want to do that anyway so we don't slow down unrelated PRs. We can run it on a cron schedule instead.

This also sounds fine.

dep.startsWith('.') ||
// Don't replace React isomorphic package, since the backend may use
// component types/features that don't exist in an older version
dep === 'react'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will we hit any snags with earlier 16.x react-dom versions and later 16.x react versions?

const version = process.argv[2];

async function main() {
await exec('mkdir build-tmp');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably have some cleanup for if this script fails midway (it does for me at the moment, and it leaves a build-tmp dir which causes it to fail next run)

- run:
name: Download a specific version of React + renderers
command: node scripts/jest/install-devtools-release-test-deps.js << parameters.version >>
- run: yarn test --project=devtools --build --ci

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yarn_test_release_devtools:
docker: *docker
environment: *environment
parameters:
version:
type: string
default: next
steps:
- checkout
- attach_workspace: *attach_workspace
- *restore_yarn_cache
- *run_yarn
- run:
name: Download a specific version of React + renderers
command: node scripts/jest/install-devtools-release-test-deps.js << parameters.version >>
- run: yarn test --project=devtools --build --ci

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed Component: Developer Tools React Core Team Opened by a member of the React Core Team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants