-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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
Migrate Travis over to Circle #16354
Closed
Closed
Changes from 8 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
1904114
First attempt, play around with beta
grabbou 1ef2f88
Fix indent and use shared install_dependencies step
grabbou 6299fb1
Comment out podspec tests temporarily to see if they pass on a non-PR…
grabbou 672d634
Change OS version so CircleCI can run the test
grabbou 14e4e3f
Remove Travis config
grabbou 19837d0
Update some ifs
grabbou b97f1be
Fix wrong variable reference
grabbou a17e8e5
Cocoapods is already on Circle
grabbou b43e749
Comments and common test step
grabbou 03f7aff
Prestart iOS simulator and run podspec tests on PRs as well
grabbou bf7dfde
Fix typo
grabbou a979ea8
Use node cache
grabbou 684089d
Fix typos
grabbou 4cf9f62
Update config.yml
hramos d751e1e
Update cache keys
hramos 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 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 |
---|---|---|
|
@@ -4,6 +4,7 @@ aliases: | |
- v1-dependencies-{{ .Branch }}-{{ checksum "package.json" }} | ||
# Fallback in case checksum fails | ||
- v1-dependencies-{{ .Branch }}- | ||
|
||
- &save-cache | ||
paths: | ||
- node_modules | ||
|
@@ -14,6 +15,7 @@ aliases: | |
- v1-website-dependencies-{{ .Branch }}-{{ checksum "website/package.json" }} | ||
# Fallback in case checksum fails | ||
- v1-website-dependencies-{{ .Branch }}- | ||
|
||
- &save-cache-website | ||
paths: | ||
- website/node_modules | ||
|
@@ -24,6 +26,7 @@ aliases: | |
- v1-danger-dependencies-{{ .Branch }}-{{ checksum "danger/package.json" }} | ||
# Fallback in case checksum fails | ||
- v1-danger-dependencies-{{ .Branch }}- | ||
|
||
- &save-cache-danger | ||
paths: | ||
- danger/node_modules | ||
|
@@ -48,6 +51,7 @@ aliases: | |
- &restore-cache-ndk | ||
keys: | ||
- v1-android-ndk-r10e-32-64 | ||
|
||
- &save-cache-ndk | ||
paths: | ||
- /opt/ndk | ||
|
@@ -79,6 +83,13 @@ aliases: | |
- ~/watchman | ||
key: v1-watchman-v4.9.0 | ||
|
||
- &install_node_dependencies | ||
| | ||
npm config set spin=false | ||
npm config set progress=false | ||
npm install --no-package-lock | ||
|
||
|
||
defaults: &defaults | ||
working_directory: ~/react-native | ||
|
||
|
@@ -90,29 +101,19 @@ jobs: | |
- image: circleci/node:8 | ||
steps: | ||
- checkout | ||
- run: npm install --no-package-lock | ||
- run: *install_node_dependencies | ||
- run: | | ||
npm test -- --maxWorkers=2 | ||
npm run lint | ||
npm run flow -- check | ||
# eslint - doesn't run on non-PR builds | ||
- run: | ||
name: Analyze Code | ||
command: | | ||
if [ -n "$CIRCLE_PR_NUMBER" ]; then | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is re-added in @hramos PR as a separate job. |
||
npm install [email protected] | ||
cat <(echo eslint; npm run lint --silent -- --format=json; echo flow; npm run flow --silent -- check --json) | GITHUB_TOKEN="af6ef0d15709bc91d""06a6217a5a826a226fb57b7" CI_USER=$CIRCLE_PROJECT_USERNAME CI_REPO=$CIRCLE_PROJECT_REPONAME PULL_REQUEST_NUMBER=$CIRCLE_PR_NUMBER node bots/code-analysis-bot.js | ||
else | ||
echo "Skipping code analysis." | ||
fi | ||
|
||
test-node-6: | ||
<<: *defaults | ||
docker: | ||
- image: circleci/node:6.11.0 | ||
steps: | ||
- checkout | ||
- run: npm install | ||
- run: *install_node_dependencies | ||
- run: | | ||
npm test -- --maxWorkers=2 | ||
npm run lint | ||
|
@@ -124,11 +125,56 @@ jobs: | |
- image: circleci/node:4.8.4 | ||
steps: | ||
- checkout | ||
- run: npm install | ||
- run: *install_node_dependencies | ||
- run: | | ||
npm test -- --maxWorkers=2 | ||
npm run lint | ||
npm run flow -- check | ||
|
||
# Runs unit tests on iOS devices | ||
test-objc-ios: | ||
<<: *defaults | ||
macos: | ||
xcode: "9.0" | ||
steps: | ||
- checkout | ||
- run: *install_node_dependencies | ||
- run: ./scripts/objc-test-ios.sh | ||
|
||
# Runs unit tests on tvOS devices | ||
test-objc-tvos: | ||
<<: *defaults | ||
macos: | ||
xcode: "9.0" | ||
steps: | ||
- checkout | ||
- run: *install_node_dependencies | ||
- run: ./scripts/objc-test-tvos.sh | ||
|
||
# Runs end to end tests | ||
test-objc-e2e: | ||
<<: *defaults | ||
macos: | ||
xcode: "9.0" | ||
steps: | ||
- checkout | ||
- run: *install_node_dependencies | ||
- run: node ./scripts/run-ci-e2e-tests.js --ios --js --retries 3; | ||
|
||
# Checks podspec | ||
test-podspec: | ||
<<: *defaults | ||
macos: | ||
xcode: "9.0" | ||
steps: | ||
- checkout | ||
- run: *install_node_dependencies | ||
- run: | | ||
if [ "$CI_PULL_REQUEST" ]; then | ||
./scripts/process-podspecs.sh | ||
else | ||
echo "Skipping testing podspec." | ||
fi | ||
|
||
test-website: | ||
<<: *defaults | ||
|
@@ -181,7 +227,7 @@ jobs: | |
- image: circleci/node:8 | ||
steps: | ||
- checkout | ||
- run: npm install --no-package-lock | ||
- run: *install_node_dependencies | ||
- run: | ||
name: Build JavaScript Bundle | ||
command: node local-cli/cli.js bundle --max-workers 2 --platform android --dev true --entry-file ReactAndroid/src/androidTest/js/TestBundle.js --bundle-output ReactAndroid/src/androidTest/assets/AndroidTestBundle.js | ||
|
@@ -258,7 +304,7 @@ jobs: | |
command: | | ||
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash - | ||
sudo apt-get install -y nodejs | ||
- run: npm install | ||
- run: *install_node_dependencies | ||
# - restore-cache: *restore-cache-watchman | ||
# - run: | ||
# name: Install Watchman Dependencies | ||
|
@@ -349,12 +395,14 @@ jobs: | |
# Workflows enables us to run multiple jobs in parallel | ||
workflows: | ||
version: 2 | ||
|
||
test_node: | ||
jobs: | ||
- test-node-8 | ||
- test-node-6 | ||
# Node 4 tests are already failing on Circle 1.0 | ||
# - test-node-4 | ||
|
||
website: | ||
jobs: | ||
- test-website | ||
|
@@ -366,6 +414,7 @@ workflows: | |
only: | ||
- /.*-stable/ | ||
- master | ||
|
||
test_android: | ||
jobs: | ||
- build-js-bundle: | ||
|
@@ -375,3 +424,10 @@ workflows: | |
- test-android: | ||
requires: | ||
- build-js-bundle | ||
|
||
test_ios: | ||
jobs: | ||
- test-objc-ios | ||
- test-objc-tvos | ||
- test-objc-e2e | ||
- test-podspec |
This file was deleted.
Oops, something went wrong.
This file contains 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
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.
We can consolidate this into a single command:
npm install --no-package-lock --no-spin --no-progress
(Using the separate
npm config
commands is good when changing the preferences globally, but we're mostly runningnpm install
on separate images where the preference won't persist)