Skip to content
This repository was archived by the owner on Aug 1, 2023. It is now read-only.

Commit 56d649c

Browse files
committed
feat: make CI tests more interesting
1 parent c00a4c5 commit 56d649c

File tree

2 files changed

+29
-4
lines changed

2 files changed

+29
-4
lines changed

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,5 +66,8 @@
6666
"stream-to-promise": "^2.2.0",
6767
"transform-loader": "~0.2.4"
6868
},
69-
"contributors": []
69+
"contributors": [],
70+
"dependencies": {
71+
"is-ci": "^1.2.1"
72+
}
7073
}

test/exchange-files.js

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ const rimraf = require('rimraf')
1717
const join = require('path').join
1818
const os = require('os')
1919
const hat = require('hat')
20+
const isCi = require('is-ci')
2021

2122
// const isWindows = os.platform() === 'win32'
2223

@@ -32,7 +33,7 @@ function tmpDir () {
3233

3334
const KB = 1024
3435
const MB = KB * 1024
35-
// const GB = MB * 1024
36+
const GB = MB * 1024
3637

3738
const sizes = [
3839
KB,
@@ -49,17 +50,38 @@ const sizes = [
4950
128 * MB
5051
// 512 * MB,
5152
// GB
53+
// 10 * GB
54+
// 100 * GB
5255
]
5356

57+
if (isCi) {
58+
sizes.push(
59+
512 * MB,
60+
GB
61+
// 10 * GB
62+
// 100 * GB
63+
)
64+
}
65+
5466
const dirs = [
5567
5,
5668
10,
5769
50
5870
// 100,
59-
// 1000
71+
// 1000,
72+
// 10000
6073
]
6174

62-
const timeout = 240 * 1000
75+
if (isCi) {
76+
dirs.push(
77+
100
78+
// 1000,
79+
// 10000
80+
)
81+
}
82+
83+
const min = 60 * 1000
84+
const timeout = isCi ? 15 * min : 5 * min
6385

6486
describe('exchange files', () => {
6587
let goDaemon

0 commit comments

Comments
 (0)