mirror of
https://github.com/zhigang1992/create-react-app.git
synced 2026-01-12 22:46:30 +08:00
Add Node 10 to CI config and remove Node 6 (#4383)
* 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.
This commit is contained in:
13
.travis.yml
13
.travis.yml
@@ -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
|
||||
@@ -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
appveyor.yml
24
appveyor.yml
@@ -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
|
||||
@@ -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
|
||||
|
||||
@@ -46,4 +49,5 @@ skip_commits:
|
||||
test_script:
|
||||
- node --version
|
||||
- npm --version
|
||||
- yarn --version
|
||||
- bash tasks/e2e-%test_suite%.sh
|
||||
|
||||
@@ -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.'
|
||||
)
|
||||
);
|
||||
|
||||
@@ -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 \
|
||||
@@ -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
|
||||
|
||||
@@ -151,7 +151,7 @@ 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 \
|
||||
@@ -159,7 +159,7 @@ E2E_FILE=./build/index.html \
|
||||
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
|
||||
|
||||
@@ -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"
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user