Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
-布谷鸟-
nosqlclient
提交
22ca5602
N
nosqlclient
项目概览
-布谷鸟-
/
nosqlclient
与 Fork 源项目一致
从无法访问的项目Fork
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
N
nosqlclient
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
22ca5602
编写于
8月 07, 2016
作者:
S
Sercan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
trying to fix travis build
上级
4cb7e54a
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
10 addition
and
253 deletion
+10
-253
.scripts/start.js
.scripts/start.js
+0
-153
.scripts/test.js
.scripts/test.js
+0
-42
.travis.yml
.travis.yml
+10
-58
未找到文件。
.scripts/start.js
已删除
100755 → 0
浏览文件 @
4cb7e54a
#!/usr/bin/env node
var
path
=
require
(
'
path
'
),
fs
=
require
(
'
fs
'
),
extend
=
require
(
'
util
'
).
_extend
,
exec
=
require
(
'
child_process
'
).
exec
,
processes
=
[];
var
baseDir
=
path
.
resolve
(
__dirname
,
'
..
'
),
srcDir
=
path
.
resolve
(
baseDir
,
''
),
chimpBin
=
path
.
resolve
(
baseDir
,
'
node_modules/.bin/chimp
'
);
var
appOptions
=
{
settings
:
'
settings.json
'
,
port
:
3000
,
env
:
{
ROOT_URL
:
'
http://localhost:3000
'
,
VELOCITY
:
1
,
JASMINE_CLIENT_UNIT
:
0
,
JASMINE_SERVER_UNIT
:
0
,
JASMINE_CLIENT_INTEGRATION
:
0
,
JASMINE_SERVER_INTEGRATION
:
1
}
};
var
mirrorOptions
=
{
settings
:
appOptions
.
settings
,
port
:
3100
,
env
:
{
IS_MIRROR
:
1
,
MONGO_URL
:
'
mongodb://localhost:
'
+
3001
+
'
/chimp_db
'
,
ROOT_URL
:
'
http://localhost:3100
'
},
logFile
:
'
./chimp-mirror.log
'
};
var
chimpSwitches
=
'
--path=
'
+
path
.
resolve
(
'
tests/features
'
)
+
//' -r=' + path.resolve('tests/features/step_definitions/domain') +
//' --criticalSteps=' + path.resolve('tests/features/step_definitions/critical') +
'
--singleSnippetPerFile=1
'
;
if
(
process
.
env
.
CI
||
process
.
env
.
TRAVIS
||
process
.
env
.
CIRCLECI
)
{
// when not in Watch mode, Chimp existing will exit Meteor too
// we also don't need Velocity for the app chimp will run against
appOptions
.
env
.
VELOCITY
=
0
;
}
else
{
chimpSwitches
+=
'
--watch
'
;
}
if
(
process
.
env
.
SIMIAN_API
&&
process
.
env
.
SIMIAN_REPOSITORY
)
{
chimpSwitches
+=
'
--simianRepositoryId=
'
+
process
.
env
.
SIMIAN_REPOSITORY
;
chimpSwitches
+=
'
--simianAccessToken=
'
+
process
.
env
.
SIMIAN_API
;
}
if
(
process
.
env
.
CUCUMBER_JSON_OUTPUT
)
{
chimpSwitches
+=
'
--jsonOutput=
'
+
process
.
env
.
CUCUMBER_JSON_OUTPUT
;
}
// set this flag to start with a mirror locally (ala Velocity xolvio:cucumber style)
if
(
process
.
env
.
WITH_MIRROR
)
{
chimpWithMirror
();
}
else
if
(
process
.
env
.
NO_METEOR
)
{
startChimp
(
'
--ddp=
'
+
appOptions
.
env
.
ROOT_URL
+
chimpSwitches
);
}
else
{
chimpNoMirror
();
}
// *************************************************
function
chimpWithMirror
()
{
appOptions
.
waitForMessage
=
'
Started MongoDB
'
;
startApp
(
function
()
{
startMirror
(
function
()
{
console
.
log
(
'
=> Test App running at:
'
,
mirrorOptions
.
env
.
ROOT_URL
);
console
.
log
(
'
=> Log file: tail -f
'
,
path
.
resolve
(
mirrorOptions
.
logFile
),
'
\n
'
);
startChimp
(
'
--ddp=
'
+
mirrorOptions
.
env
.
ROOT_URL
+
chimpSwitches
)
});
});
}
function
chimpNoMirror
()
{
appOptions
.
waitForMessage
=
'
App running at
'
;
startApp
(
function
()
{
startChimp
(
'
--ddp=
'
+
appOptions
.
env
.
ROOT_URL
+
chimpSwitches
);
});
}
function
startApp
(
callback
)
{
startProcess
({
name
:
'
Meteor App
'
,
command
:
'
meteor --settings
'
+
appOptions
.
settings
+
'
--port
'
+
appOptions
.
port
,
waitForMessage
:
appOptions
.
waitForMessage
,
options
:
{
cwd
:
srcDir
,
env
:
extend
(
appOptions
.
env
,
process
.
env
)
}
},
callback
);
}
function
startMirror
(
callback
)
{
startProcess
({
name
:
'
Meteor Mirror
'
,
command
:
'
meteor --settings
'
+
mirrorOptions
.
settings
+
'
--port
'
+
mirrorOptions
.
port
,
silent
:
true
,
logFile
:
mirrorOptions
.
logFile
,
waitForMessage
:
'
App running at
'
,
options
:
{
cwd
:
srcDir
,
env
:
extend
(
mirrorOptions
.
env
,
process
.
env
)
}
},
callback
);
}
function
startChimp
(
command
)
{
startProcess
({
name
:
'
Chimp
'
,
command
:
chimpBin
+
'
'
+
command
});
}
function
startProcess
(
opts
,
callback
)
{
var
proc
=
exec
(
opts
.
command
,
opts
.
options
);
if
(
opts
.
waitForMessage
)
{
proc
.
stdout
.
on
(
'
data
'
,
function
waitForMessage
(
data
)
{
if
(
data
.
toString
().
match
(
opts
.
waitForMessage
))
{
if
(
callback
)
{
callback
();
}
}
});
}
if
(
!
opts
.
silent
)
{
proc
.
stdout
.
pipe
(
process
.
stdout
);
proc
.
stderr
.
pipe
(
process
.
stderr
);
}
if
(
opts
.
logFile
)
{
var
logStream
=
fs
.
createWriteStream
(
opts
.
logFile
,
{
flags
:
'
a
'
});
proc
.
stdout
.
pipe
(
logStream
);
proc
.
stderr
.
pipe
(
logStream
);
}
proc
.
on
(
'
close
'
,
function
(
code
)
{
console
.
log
(
opts
.
name
,
'
exited with code
'
+
code
);
for
(
var
i
=
0
;
i
<
processes
.
length
;
i
+=
1
)
{
processes
[
i
].
kill
();
}
process
.
exit
(
code
);
});
processes
.
push
(
proc
);
}
.scripts/test.js
已删除
100755 → 0
浏览文件 @
4cb7e54a
#!/usr/bin/env node
var
path
=
require
(
'
path
'
),
extend
=
require
(
'
util
'
).
_extend
,
exec
=
require
(
'
child_process
'
).
exec
;
// var chimpScript = path.resolve(__dirname, 'start.js');
// runTests();
// function runTests() {
// runChimp(function () {
// console.log('Yay!');
// });
// }
// function runChimp(callback) {
// startProcess({
// name: 'Chimp',
// options: {
// env: extend({CI: 1}, process.env)
// },
// command: chimpScript
// }, callback);
// }
// function startProcess(opts, callback) {
// var proc = exec(
// opts.command,
// opts.options
// );
// proc.stdout.pipe(process.stdout);
// proc.stderr.pipe(process.stderr);
// proc.on('close', function (code) {
// if (code > 0) {
// console.log(opts.name, 'exited with code ' + code);
// process.exit(code);
// } else {
// callback();
// }
// });
// }
.travis.yml
浏览文件 @
22ca5602
sudo
:
true
dist
:
trusty
sudo
:
false
language
:
node_js
node_js
:
-
5.2.0
env
:
global
:
MONGO_URL
:
"
mongodb://localhost:27017/meteor"
before_install
:
-
curl https://install.meteor.com | /bin/sh
-
export PATH="$HOME/.meteor:$PATH"
addons
:
apt
:
sources
:
-
google-chrome
packages
:
-
google-chrome-stable
firefox
:
"
latest"
script
:
-
meteor build $HOME/build.tgz
cache
:
directories
:
-
"
$HOME/node_modules"
-
"
$HOME/.npm"
-
"
$HOME/mongodb-linux-x86_64-2.6.4"
-
"
$HOME/.meteor"
-
"
src/.meteor/local/build"
-
"
src/.meteor/local/bundler-cache"
-
"
src/.meteor/local/db"
-
"
src/.meteor/local/isopacks"
-
"
src/.meteor/local/plugin-cache"
-
"
src/.meteor/local/mirrors"
before_cache
:
-
rm -rf $HOME/build/rsercano/mongoclient/.meteor/local/log
-
rm -rf $HOME/build/rsercano/mongoclient/.meteor/local/run
before_install
:
# Download Meteor
-
PATH=$PATH:$HOME/.meteor
-
if [ ! -e $HOME/.meteor/meteor ]; then curl -k https://install.meteor.com | sh; fi
# Use X Virtual Frame Buffer
-
"
/sbin/start-stop-daemon
--start
--quiet
--pidfile
/tmp/custom_xvfb_99.pid
--make-pidfile
--background
--exec
/usr/bin/Xvfb
--
:99
-ac
-screen
0
1027x768x16"
-
sleep
3
# give xvfb some time to start
-
"
export
DISPLAY=:99.0"
# Install and start MongoDB 2.6
-
export MONGO_PACKAGE=mongodb-linux-x86_64-2.6.4
-
export MONGO_HOME=$HOME/$MONGO_PACKAGE
-
if [[ ! -e $MONGO_HOME/bin/mongod ]]; then cd $HOME; wget http://downloads.mongodb.org/linux/$MONGO_PACKAGE.tgz && tar xvzf $HOME/$MONGO_PACKAGE.tgz; fi
-
export PATH=$MONGO_HOME/bin:$PATH
-
mkdir -p $HOME/data/db
-
$MONGO_HOME/bin/mongod --dbpath $HOME/data/db > $HOME/mongo.log 2>&1 &
-
cd $HOME/build/rsercano/mongoclient
# Install NPM dependencies
-
npm install
# Cache Selenium & ChromeDriver
-
./node_modules/.bin/chimp --path=content
# there are no tests in content
# Make sure Mongo has started
-
until nc -z localhost 27017 ; do echo Waiting for MongoDB; sleep 1; done
-
node_modules
install
:
before_script
:
-
meteor npm install
script
:
-
npm test
-
meteor test --once
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录