mirror of
https://github.com/typeorm/typeorm.git
synced 2025-12-08 21:26:23 +00:00
fix(test-coverage): coverage is back at CI
coverage was removed because it prevented failing tests from actually failing on CI. This is an attempt at adding it back in.
This commit is contained in:
parent
7b4ea88629
commit
fa17752dc5
35
gulpfile.ts
35
gulpfile.ts
@ -29,11 +29,11 @@ export class Gulpfile {
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Creates a delay and resolves after 30 seconds.
|
||||
* Creates a delay and resolves after 15 seconds.
|
||||
*/
|
||||
@Task()
|
||||
wait(cb: Function) {
|
||||
setTimeout(() => cb(), 30000);
|
||||
setTimeout(() => cb(), 15000);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -325,8 +325,17 @@ export class Gulpfile {
|
||||
/**
|
||||
* Runs post coverage operations.
|
||||
*/
|
||||
@Task("coveragePost", ["coveragePre"])
|
||||
@Task()
|
||||
coveragePost() {
|
||||
return gulp.src(["./build/compiled/test/**/*.js"])
|
||||
.pipe(istanbul.writeReports());
|
||||
}
|
||||
|
||||
/**
|
||||
* Runs mocha tests.
|
||||
*/
|
||||
@Task()
|
||||
runTests() {
|
||||
chai.should();
|
||||
chai.use(require("sinon-chai"));
|
||||
chai.use(require("chai-as-promised"));
|
||||
@ -336,22 +345,6 @@ export class Gulpfile {
|
||||
bail: true,
|
||||
grep: !!args.grep ? new RegExp(args.grep) : undefined,
|
||||
timeout: 15000
|
||||
}))
|
||||
}
|
||||
|
||||
/**
|
||||
* Runs tests the quick way.
|
||||
*/
|
||||
@Task()
|
||||
quickTests() {
|
||||
chai.should();
|
||||
chai.use(require("sinon-chai"));
|
||||
chai.use(require("chai-as-promised"));
|
||||
|
||||
return gulp.src(["./build/compiled/test/**/*.js"])
|
||||
.pipe(mocha({
|
||||
bail: true,
|
||||
timeout: 15000
|
||||
}));
|
||||
}
|
||||
|
||||
@ -381,9 +374,11 @@ export class Gulpfile {
|
||||
@SequenceTask("ci-tests")
|
||||
ciTests() {
|
||||
return [
|
||||
"wait",
|
||||
"compile",
|
||||
"tslint",
|
||||
"wait",
|
||||
"coveragePre",
|
||||
"runTests",
|
||||
"coveragePost",
|
||||
"coverageRemap"
|
||||
];
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user