mirror of
https://github.com/typeorm/typeorm.git
synced 2025-12-08 21:26:23 +00:00
added delay for ci tests
This commit is contained in:
parent
fb87751156
commit
3f9b5fc59f
33
gulpfile.ts
33
gulpfile.ts
@ -19,7 +19,7 @@ const sourcemaps = require("gulp-sourcemaps");
|
||||
const istanbul = require("gulp-istanbul");
|
||||
const remapIstanbul = require("remap-istanbul/lib/gulpRemapIstanbul");
|
||||
const ts = require("gulp-typescript");
|
||||
const args = require('yargs').argv;
|
||||
const args = require("yargs").argv;
|
||||
|
||||
@Gulpclass()
|
||||
export class Gulpfile {
|
||||
@ -28,6 +28,14 @@ export class Gulpfile {
|
||||
// General tasks
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Creates a delay and resolves after 10 seconds.
|
||||
*/
|
||||
@Task()
|
||||
wait(cb: Function) {
|
||||
setTimeout(() => cb(), 10000);
|
||||
}
|
||||
|
||||
/**
|
||||
* Cleans build folder.
|
||||
*/
|
||||
@ -144,7 +152,7 @@ export class Gulpfile {
|
||||
return del([
|
||||
"./build/systemjs/**",
|
||||
"./build/browser/**"
|
||||
])
|
||||
]);
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
@ -361,7 +369,26 @@ export class Gulpfile {
|
||||
*/
|
||||
@SequenceTask()
|
||||
tests() {
|
||||
return ["compile", "tslint", "coveragePost", "coverageRemap"];
|
||||
return [
|
||||
"compile",
|
||||
"tslint",
|
||||
"coveragePost",
|
||||
"coverageRemap"
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Runs tests, but creates a small delay before running them to make sure to give time for docker containers to be initialized.
|
||||
*/
|
||||
@SequenceTask("ci-tests")
|
||||
ciTests() {
|
||||
return [
|
||||
"wait",
|
||||
"compile",
|
||||
"tslint",
|
||||
"coveragePost",
|
||||
"coverageRemap"
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -88,7 +88,7 @@
|
||||
"yargs": "^8.0.2"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "gulp tests",
|
||||
"test": "gulp ci-tests",
|
||||
"compile": "tsc",
|
||||
"setup:config": "gulp createTravisOrmConfig",
|
||||
"package": "gulp package"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user