-
Notifications
You must be signed in to change notification settings - Fork 50.2k
Added circle.yml and scripts/circleci back in #8745
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
Closed
Closed
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
6f30c45
Added circle.yml and scripts/circleci back in
jackjocross f8075bb
Removed CircleCI Fiber tests
jackjocross f7d47b9
Fixed linting errors and added --runInBand flag
jackjocross a968e43
Updated flow-bin
jackjocross 4b29e34
npm install instead of yarn install
jackjocross c21f571
Cleaned circle.yml and flow ignores docs
jackjocross 8426447
Updated jest path
jackjocross 9ad9c79
Added jest-cli dependency
jackjocross File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| --- | ||
| general: | ||
| branches: | ||
| ignore: | ||
| - gh-pages | ||
|
|
||
| machine: | ||
| timezone: America/Los_Angeles | ||
| node: | ||
| version: 6 | ||
| ruby: | ||
| version: 2.2.3 | ||
| environment: | ||
| TRAVIS_REPO_SLUG: facebook/react | ||
|
|
||
| dependencies: | ||
| pre: | ||
| # This is equivalent to $TRAVIS_COMMIT_RANGE | ||
| # Need to figure out how to bail early if this is a "docs only" build | ||
| - echo $CIRCLE_COMPARE_URL | cut -d/ -f7 | ||
| override: | ||
| - bundle install --gemfile=docs/Gemfile --deployment --path=vendor/bundle --jobs=3 --retry=3 | ||
| - npm install | ||
| - scripts/circleci/set_up_github_keys.sh | ||
| post: | ||
| # - npm ls --depth=0 | ||
| cache_directories: | ||
| - docs/vendor/bundle | ||
| - .grunt # Show size comparisons between builds | ||
| - ~/react-gh-pages # docs checkout | ||
|
|
||
| test: | ||
| override: | ||
| - ./scripts/circleci/test_entry_point.sh: | ||
| parallel: true | ||
|
|
||
| deployment: | ||
| staging: | ||
| branch: /.*/ | ||
| commands: | ||
| - ./scripts/circleci/upload_build.sh | ||
| - ./scripts/circleci/build_gh_pages.sh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,5 @@ | ||
| 'use strict'; | ||
|
|
||
| exports.config = { | ||
| paths: { | ||
| public: '.', | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,5 @@ | ||
| 'use strict'; | ||
|
|
||
| var fs = require('fs'); | ||
| var path = require('path'); | ||
| var { spawnSync } = require('child_process'); | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,5 @@ | ||
| 'use strict'; | ||
|
|
||
| module.exports = { | ||
| baseUrl: '.', | ||
| name: 'input', | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,5 @@ | ||
| 'use strict'; | ||
|
|
||
| var Builder = require('systemjs-builder'); | ||
|
|
||
| var builder = new Builder('/', './config.js'); | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,5 @@ | ||
| 'use strict'; | ||
|
|
||
| System.config({ | ||
| paths: { | ||
| react: '../../build/react-with-addons.js', | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,5 @@ | ||
| 'use strict'; | ||
|
|
||
| import React from 'react'; | ||
| import ReactDOM from 'react-dom'; | ||
|
|
||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,5 @@ | ||
| 'use strict'; | ||
|
|
||
| module.exports = { | ||
| entry: './input', | ||
| output: { | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,5 @@ | ||
| 'use strict'; | ||
|
|
||
| var React = require('react'); | ||
| var ReactDOM = require('react-dom'); | ||
|
|
||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,5 @@ | ||
| 'use strict'; | ||
|
|
||
| module.exports = { | ||
| entry: './input', | ||
| output: { | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| #!/bin/bash | ||
|
|
||
| set -e | ||
|
|
||
| if [ -z $CI_PULL_REQUEST ] && [ "$CIRCLE_BRANCH" = "$REACT_WEBSITE_BRANCH" ]; then | ||
|
|
||
| GH_PAGES_DIR=`pwd`/../react-gh-pages | ||
|
|
||
| # check if directory exists (restored from cache) | ||
| if [ -d $GH_PAGES_DIR ]; then | ||
| pushd $GH_PAGES_DIR | ||
| git pull origin gh-pages | ||
| popd | ||
| else | ||
| git clone --branch gh-pages --depth=1 \ | ||
| https://reactjs-bot@github.com/facebook/react.git \ | ||
| $GH_PAGES_DIR | ||
| fi | ||
|
|
||
| pushd docs | ||
| bundle exec rake release | ||
| cd $GH_PAGES_DIR | ||
| git status | ||
| git --no-pager diff | ||
| if ! git diff-index --quiet HEAD --; then | ||
| git add -A . | ||
| git commit -m "Rebuild website" | ||
| git push origin gh-pages | ||
| fi | ||
| popd | ||
| else | ||
| echo "Not building website" | ||
| fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| #!/bin/bash | ||
|
|
||
| set -e | ||
|
|
||
| if [ -n $GITHUB_TOKEN ]; then | ||
|
|
||
| GH_PAGES_DIR=`pwd`/../react-gh-pages | ||
| echo "machine github.com login reactjs-bot password $GITHUB_TOKEN" >~/.netrc | ||
| git config --global user.name "Circle CI" | ||
| git config --global user.email "circle@reactjs.org" | ||
|
|
||
| fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| #!/bin/bash | ||
|
|
||
| set -e | ||
|
|
||
| ./node_modules/.bin/grunt jest:coverage | ||
| if [ -z $CI_PULL_REQUEST ]; then | ||
| cat ./coverage/lcov.info | ./node_modules/.bin/coveralls | ||
| fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,62 @@ | ||
| #!/bin/bash | ||
|
|
||
| set -e | ||
|
|
||
| COMMANDS_TO_RUN=() | ||
|
|
||
| # We split these to be approximately equal chunks of four. As of this writing, | ||
| # times were around: | ||
| # - 3:30 test_coverage.sh | ||
| # - 2:00 test_fiber.sh | ||
| # - 1:15 test_html_generation.sh | ||
| # - 1:15 grunt build | ||
| # with everything else < 0:30. | ||
|
|
||
| if [ $((1 % CIRCLE_NODE_TOTAL)) -eq "$CIRCLE_NODE_INDEX" ]; then | ||
| COMMANDS_TO_RUN+=('./scripts/circleci/test_coverage.sh') | ||
| fi | ||
|
|
||
| if [ $((2 % CIRCLE_NODE_TOTAL)) -eq "$CIRCLE_NODE_INDEX" ]; then | ||
| COMMANDS_TO_RUN+=('./scripts/circleci/test_html_generation.sh') | ||
| fi | ||
|
|
||
| # These seem out of order but extract-errors must be run after jest. | ||
| if [ $((0 % CIRCLE_NODE_TOTAL)) -eq "$CIRCLE_NODE_INDEX" ]; then | ||
| COMMANDS_TO_RUN+=('./node_modules/.bin/gulp lint') | ||
| COMMANDS_TO_RUN+=('./node_modules/.bin/gulp flow') | ||
| COMMANDS_TO_RUN+=('./node_modules/.bin/grunt build') | ||
| COMMANDS_TO_RUN+=('./scripts/circleci/test_extract_errors.sh') | ||
| COMMANDS_TO_RUN+=('./scripts/circleci/track_stats.sh') | ||
| fi | ||
|
|
||
| RETURN_CODES=() | ||
| FAILURE=0 | ||
|
|
||
| printf "Node #%s (%s total). " "$CIRCLE_NODE_INDEX" "$CIRCLE_NODE_TOTAL" | ||
| if [ -n "${COMMANDS_TO_RUN[0]}" ]; then | ||
| echo "Preparing to run commands:" | ||
| for cmd in "${COMMANDS_TO_RUN[@]}"; do | ||
| echo "- $cmd" | ||
| done | ||
|
|
||
| for cmd in "${COMMANDS_TO_RUN[@]}"; do | ||
| echo | ||
| echo "$ $cmd" | ||
| set +e | ||
| $cmd | ||
| rc=$? | ||
| set -e | ||
| RETURN_CODES+=($rc) | ||
| if [ $rc -ne 0 ]; then | ||
| FAILURE=$rc | ||
| fi | ||
| done | ||
|
|
||
| echo | ||
| for i in "${!COMMANDS_TO_RUN[@]}"; do | ||
| echo "Received return code ${RETURN_CODES[i]} from: ${COMMANDS_TO_RUN[i]}" | ||
| done | ||
| exit $FAILURE | ||
| else | ||
| echo "No commands to run." | ||
| fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| #!/bin/bash | ||
|
|
||
| set -e | ||
|
|
||
| ./node_modules/.bin/gulp react:extract-errors | ||
| git checkout -- scripts/error-codes/codes.json |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| #!/bin/bash | ||
|
|
||
| set -e | ||
|
|
||
| echo 'Testing in server-render (HTML generation) mode...' | ||
| printf '\nmodule.exports.useCreateElement = false;\n' \ | ||
| >> src/renderers/dom/shared/ReactDOMFeatureFlags.js | ||
| ./node_modules/.bin/grunt jest:normal | ||
| git checkout -- src/renderers/dom/shared/ReactDOMFeatureFlags.js |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| #!/bin/bash | ||
|
|
||
| set -e | ||
|
|
||
| ALL_FILES=`find src -name '*.js' | grep -v umd/ | grep -v __tests__ | grep -v __mocks__` | ||
| COUNT_ALL_FILES=`echo "$ALL_FILES" | wc -l` | ||
| COUNT_WITH_FLOW=`grep '@flow' $ALL_FILES | perl -pe 's/:.+//' | wc -l` | ||
| node scripts/facts-tracker/index.js "flow-files" "$COUNT_WITH_FLOW/$COUNT_ALL_FILES" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| #!/bin/bash | ||
|
|
||
| set -e | ||
|
|
||
| if [ -z $CI_PULL_REQUEST ] && [ -n "$BUILD_SERVER_ENDPOINT" ]; then | ||
| curl \ | ||
| -F "react=@build/react.js" \ | ||
| -F "react.min=@build/react.min.js" \ | ||
| -F "react-with-addons=@build/react-with-addons.js" \ | ||
| -F "react-with-addons.min=@build/react-with-addons.min.js" \ | ||
| -F "react-dom=@build/react-dom.js" \ | ||
| -F "react-dom.min=@build/react-dom.min.js" \ | ||
| -F "react-dom-server=@build/react-dom-server.js" \ | ||
| -F "react-dom-server.min=@build/react-dom-server.min.js" \ | ||
| -F "npm-react=@build/packages/react.tgz" \ | ||
| -F "npm-react-dom=@build/packages/react-dom.tgz" \ | ||
| -F "commit=$CIRCLE_SHA1" \ | ||
| -F "date=`git log --format='%ct' -1`" \ | ||
| -F "pull_request=false" \ | ||
| -F "token=$BUILD_SERVER_TOKEN" \ | ||
| -F "branch=$CIRCLE_BRANCH" \ | ||
| $BUILD_SERVER_ENDPOINT | ||
| fi |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that just adding
jest-cliis not enough.The problem is we haven't synced
package.jsonfor a while, and we need to update it to match what we have onmaster. For example we already have jest-cli@18 there.In general, in this PR the goal is to bring it as close as possible to master. We probably missed some commits at some point. There shouldn't be much intentional divergence between
15-stableandmaster. So now that you found a set of changes that work, could you also reduce it so that it matchesmasterwhenever possible?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In terms of linting, would it be preferable to pull in the eslint updates from
masterand make15-stableconform? Or update15-stableto conform to its current linting rules? I seem to be getting linting errors on install due to these changes and this rule. That rule was removed in16.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It’s best to make it as close to
masteras we can in terms of linting setup. It would make sense to me to have 32f5b03 and similar changes cherry-picked.