Skip to content

Commit

Permalink
Add Node 10 to CI config and remove Node 6 (#4383)
Browse files Browse the repository at this point in the history
* Add Node 10 to Travis config. Remove Node 6.

* Add Node 10 to Appveyor config. Remove Node 6.

* Remove node 9 from travis config.

* Increase mocha timeout.

* Update minimum Node version to 8.

* Update yarn to latest on Travis.

* Update old-node test to use Node 4.

* Increase mocha timeout in kitchensink-eject tests.

* Update yarn to latest on Appveyor.
  • Loading branch information
iansu authored Jul 16, 2018
1 parent 366e5d3 commit 92d9c5a
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 25 deletions.
13 changes: 6 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,23 @@ dist: trusty
language: node_js
node_js:
- 8
- 9
- 10
cache:
directories:
- node_modules
- packages/create-react-app/node_modules
- packages/react-scripts/node_modules
before_install:
- curl -o- -L https://yarnpkg.com/install.sh | bash
- export PATH="$HOME/.yarn/bin:$PATH"
install: true
script:
- 'if [ $TEST_SUITE = "simple" ]; then tasks/e2e-simple.sh; fi'
- 'if [ $TEST_SUITE = "installs" ]; then tasks/e2e-installs.sh; fi'
- 'if [ $TEST_SUITE = "kitchensink" ]; then tasks/e2e-kitchensink.sh; fi'
- 'if [ $TEST_SUITE = "kitchensink-eject" ]; then tasks/e2e-kitchensink-eject.sh; fi'
- 'if [ $TEST_SUITE = "old-node" ]; then tasks/e2e-old-node.sh; fi'
- 'if [ $TEST_SUITE = "monorepos" ]; then tasks/e2e-monorepos.sh; fi'
- 'if [ $TEST_SUITE = "old-node" ]; then tasks/e2e-old-node.sh; fi'
env:
matrix:
- TEST_SUITE=simple
Expand All @@ -26,9 +29,5 @@ env:
- TEST_SUITE=monorepos
matrix:
include:
- node_js: 0.10
- node_js: 4
env: TEST_SUITE=old-node
- node_js: 6
env: TEST_SUITE=kitchensink
- node_js: 6
env: TEST_SUITE=kitchensink-eject
24 changes: 14 additions & 10 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,25 @@ image: Visual Studio 2017

environment:
matrix:
- nodejs_version: 8
- nodejs_version: 10
test_suite: "simple"
- nodejs_version: 8
- nodejs_version: 10
test_suite: "installs"
- nodejs_version: 8
- nodejs_version: 10
test_suite: "kitchensink"
- nodejs_version: 8
- nodejs_version: 10
test_suite: "kitchensink-eject"
- nodejs_version: 8
- nodejs_version: 10
test_suite: "monorepos"
- nodejs_version: 6
- nodejs_version: 8
test_suite: "simple"
- nodejs_version: 6
- nodejs_version: 8
test_suite: "installs"
- nodejs_version: 6
- nodejs_version: 8
test_suite: "kitchensink"
- nodejs_version: 6
- nodejs_version: 8
test_suite: "kitchensink-eject"
- nodejs_version: 6
- nodejs_version: 8
test_suite: "monorepos"
cache:
- node_modules -> appveyor.cleanup-cache.txt
Expand All @@ -36,6 +36,9 @@ platform:

install:
- ps: Install-Product node $env:nodejs_version $env:platform
- ps: |
(New-Object Net.WebClient).DownloadFile("https://yarnpkg.com/latest.msi", "$env:temp\yarn.msi")
cmd /c start /wait msiexec.exe /i $env:temp\yarn.msi /quiet /qn /norestart
build: off

Expand All @@ -46,4 +49,5 @@ skip_commits:
test_script:
- node --version
- npm --version
- yarn --version
- bash tasks/e2e-%test_suite%.sh
4 changes: 2 additions & 2 deletions packages/create-react-app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,13 @@ var currentNodeVersion = process.versions.node;
var semver = currentNodeVersion.split('.');
var major = semver[0];

if (major < 4) {
if (major < 8) {
console.error(
chalk.red(
'You are running Node ' +
currentNodeVersion +
'.\n' +
'Create React App requires Node 4 or higher. \n' +
'Create React App requires Node 8 or higher. \n' +
'Please update your version of Node.'
)
);
Expand Down
4 changes: 2 additions & 2 deletions tasks/e2e-kitchensink-eject.sh
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ E2E_URL="http://localhost:3002" \
CI=true NODE_PATH=src \
NODE_ENV=development \
BABEL_ENV=test \
node_modules/.bin/mocha --compilers js:@babel/register --require @babel/polyfill integration/*.test.js
node_modules/.bin/mocha --timeout 30000 --compilers js:@babel/register --require @babel/polyfill integration/*.test.js

# Test "production" environment
E2E_FILE=./build/index.html \
Expand All @@ -168,7 +168,7 @@ E2E_FILE=./build/index.html \
BABEL_ENV=test \
NODE_PATH=src \
PUBLIC_URL=http://www.example.org/spa/ \
node_modules/.bin/mocha --compilers js:@babel/register --require @babel/polyfill integration/*.test.js
node_modules/.bin/mocha --timeout 30000 --compilers js:@babel/register --require @babel/polyfill integration/*.test.js

# Cleanup
cleanup
4 changes: 2 additions & 2 deletions tasks/e2e-kitchensink.sh
Original file line number Diff line number Diff line change
Expand Up @@ -151,15 +151,15 @@ E2E_URL="http://localhost:3001" \
CI=true NODE_PATH=src \
NODE_ENV=development \
BABEL_ENV=test \
node_modules/.bin/mocha --compilers js:@babel/register --require @babel/polyfill integration/*.test.js
node_modules/.bin/mocha --timeout 30000 --compilers js:@babel/register --require @babel/polyfill integration/*.test.js
# Test "production" environment
E2E_FILE=./build/index.html \
CI=true \
NODE_PATH=src \
NODE_ENV=production \
BABEL_ENV=test \
PUBLIC_URL=http://www.example.org/spa/ \
node_modules/.bin/mocha --compilers js:@babel/register --require @babel/polyfill integration/*.test.js
node_modules/.bin/mocha --timeout 30000 --compilers js:@babel/register --require @babel/polyfill integration/*.test.js

# Cleanup
cleanup
4 changes: 2 additions & 2 deletions tasks/local-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ function print_help {
echo "Usage: ${0} [OPTIONS]"
echo ""
echo "OPTIONS:"
echo " --node-version <version> the node version to use while testing [6]"
echo " --node-version <version> the node version to use while testing [8]"
echo " --git-branch <branch> the git branch to checkout for testing [the current one]"
echo " --test-suite <suite> which test suite to use ('simple', installs', 'kitchensink', 'all') ['all']"
echo " --interactive gain a bash shell after the test run"
Expand All @@ -18,7 +18,7 @@ function print_help {

cd $(dirname $0)

node_version=6
node_version=8
current_git_branch=`git rev-parse --abbrev-ref HEAD`
git_branch=${current_git_branch}
test_suite=all
Expand Down

0 comments on commit 92d9c5a

Please sign in to comment.