Skip to content

Commit dcd8ea6

Browse files
authored
Always use Yarn on CI (#3738)
1 parent a03524c commit dcd8ea6

File tree

5 files changed

+2
-45
lines changed

5 files changed

+2
-45
lines changed

Diff for: .travis.yml

-6
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ script:
1515
- 'if [ $TEST_SUITE = "installs" ]; then tasks/e2e-installs.sh; fi'
1616
- 'if [ $TEST_SUITE = "kitchensink" ]; then tasks/e2e-kitchensink.sh; fi'
1717
env:
18-
global:
19-
- USE_YARN=no
2018
matrix:
2119
- TEST_SUITE=simple
2220
- TEST_SUITE=installs
@@ -25,7 +23,3 @@ matrix:
2523
include:
2624
- node_js: 0.10
2725
env: TEST_SUITE=simple
28-
# There's a weird Yarn/Lerna bug related to prerelease versions.
29-
# TODO: reenable after we ship 1.0.
30-
# - node_js: 6
31-
# env: USE_YARN=yes TEST_SUITE=simple

Diff for: tasks/e2e-installs.sh

-7
Original file line numberDiff line numberDiff line change
@@ -103,13 +103,6 @@ grep -v "postinstall" package.json > temp && mv temp package.json
103103
npm install
104104
mv package.json.bak package.json
105105

106-
if [ "$USE_YARN" = "yes" ]
107-
then
108-
# Install Yarn so that the test can use it to install packages.
109-
npm install -g yarn
110-
yarn cache clean
111-
fi
112-
113106
# We removed the postinstall, so do it manually
114107
node bootstrap.js
115108

Diff for: tasks/e2e-kitchensink.sh

+1-13
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,7 @@ function install_package {
5858

5959
# Install `dependencies`
6060
cd node_modules/$pkg/
61-
if [ "$USE_YARN" = "yes" ]
62-
then
63-
yarn install --production
64-
else
65-
npm install --only=production
66-
fi
61+
npm install --only=production
6762
# Remove our packages to ensure side-by-side versions are used (which we link)
6863
rm -rf node_modules/{babel-preset-react-app,eslint-config-react-app,react-dev-utils,react-error-overlay,react-scripts}
6964
cd ../..
@@ -120,13 +115,6 @@ grep -v "postinstall" package.json > temp && mv temp package.json
120115
npm install
121116
mv package.json.bak package.json
122117

123-
if [ "$USE_YARN" = "yes" ]
124-
then
125-
# Install Yarn so that the test can use it to install packages.
126-
npm install -g yarn
127-
yarn cache clean
128-
fi
129-
130118
# We removed the postinstall, so do it manually
131119
node bootstrap.js
132120

Diff for: tasks/e2e-simple.sh

+1-13
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,7 @@ function install_package {
5757

5858
# Install `dependencies`
5959
cd node_modules/$pkg/
60-
if [ "$USE_YARN" = "yes" ]
61-
then
62-
yarn install --production
63-
else
64-
npm install --only=production
65-
fi
60+
npm install --only=production
6661
# Remove our packages to ensure side-by-side versions are used (which we link)
6762
rm -rf node_modules/{babel-preset-react-app,eslint-config-react-app,react-dev-utils,react-error-overlay,react-scripts}
6863
cd ../..
@@ -147,13 +142,6 @@ then
147142
[[ $err_output =~ You\ are\ running\ Node ]] && exit 0 || exit 1
148143
fi
149144

150-
if [ "$USE_YARN" = "yes" ]
151-
then
152-
# Install Yarn so that the test can use it to install packages.
153-
npm install -g yarn
154-
yarn cache clean
155-
fi
156-
157145
# We removed the postinstall, so do it manually here
158146
node bootstrap.js
159147

Diff for: tasks/local-test.sh

-6
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ function print_help {
1111
echo " --node-version <version> the node version to use while testing [6]"
1212
echo " --git-branch <branch> the git branch to checkout for testing [the current one]"
1313
echo " --test-suite <suite> which test suite to use ('simple', installs', 'kitchensink', 'all') ['all']"
14-
echo " --yarn if present, use yarn as the package manager"
1514
echo " --interactive gain a bash shell after the test run"
1615
echo " --help print this message and exit"
1716
echo ""
@@ -22,7 +21,6 @@ cd $(dirname $0)
2221
node_version=6
2322
current_git_branch=`git rev-parse --abbrev-ref HEAD`
2423
git_branch=${current_git_branch}
25-
use_yarn=no
2624
test_suite=all
2725
interactive=false
2826

@@ -36,9 +34,6 @@ while [ "$1" != "" ]; do
3634
shift
3735
git_branch=$1
3836
;;
39-
"--yarn")
40-
use_yarn=yes
41-
;;
4237
"--test-suite")
4338
shift
4439
test_suite=$1
@@ -107,7 +102,6 @@ CMD
107102
docker run \
108103
--env CI=true \
109104
--env NPM_CONFIG_QUIET=true \
110-
--env USE_YARN=${use_yarn} \
111105
--tty \
112106
--user node \
113107
--volume ${PWD}/..:/var/create-react-app \

0 commit comments

Comments
 (0)