Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit6e3d8d6

Browse files
committed
proper execution of the integration tests
1 parent44d7555 commit6e3d8d6

File tree

3 files changed

+23
-5
lines changed

3 files changed

+23
-5
lines changed

‎.travis.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ script:
77
-lerna bootstrap --ignore={demos}
88
-yarn test:unit
99
-lerna run test
10-
-node ./tests/bin/is-first-ci-job.js && yarn test:integration:build || echo
11-
-node ./tests/bin/is-first-ci-job.js && yarn test:integration || echo
10+
-node ./tests/bin/run-on-first-ci-job.js && yarn test:integration:build
11+
-node ./tests/bin/run-on-first-ci-job.js && yarn test:integration
1212
after_success:"yarn coveralls"
1313
cache:
1414
yarn:true

‎tests/bin/is-first-ci-job.js‎

Lines changed: 0 additions & 3 deletions
This file was deleted.

‎tests/bin/run-on-first-ci-job.js‎

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
constciJobNumber=require("ci-job-number");
2+
const{ spawn}=require("child_process");
3+
4+
if(ciJobNumber()!==1){
5+
// If it's not the first job, then just return with a success code.
6+
process.exit(0);
7+
}
8+
9+
// Run the command otherwise.
10+
constcommand=process.argv[2];
11+
constargs=process.argv.slice(3);
12+
13+
constexecution=spawn(command,args);
14+
15+
execution.stdout.on("data",data=>{
16+
process.stdout.write(data.toString());
17+
});
18+
19+
execution.stderr.on("data",data=>{
20+
console.error(data.toString());
21+
});

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp