Skip to content

Commit 4e86d92

Browse files
author
Julio Farah
authored
Run unit tests in CI (#21)
* CI * remove puppeteer * revert unnecessary changes
1 parent ae266d8 commit 4e86d92

File tree

4 files changed

+22
-67
lines changed

4 files changed

+22
-67
lines changed

.buildkite/pipeline.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
env:
2-
SEGMENT_CONTEXTS: 'snyk,npm,aws-credentials,ecr,saucelabs'
2+
SEGMENT_CONTEXTS: 'snyk,npm,aws-credentials,ecr'
33
SEGMENT_BUILDKITE_IMAGE: 'buildkite-agent-node12'
44

55
steps:
66
- label: ':hammer: Build and Test'
77
command:
88
- npm config set "//registry.npmjs.org/:_authToken" $${NPM_TOKEN}
99
- yarn install --frozen-lockfile
10-
# - yarn lint
11-
# - yarn test
12-
# - yarn test:ci
10+
- yarn test
1311
plugins:
1412
- ssh://git@github.com/segmentio/cache-buildkite-plugin#v3.0.0:
1513
key: "v2.1-cache-dev-{{ checksum 'yarn.lock' }}"
@@ -20,8 +18,7 @@ steps:
2018
user: root
2119
environment:
2220
- NPM_TOKEN
23-
- SAUCE_USERNAME
24-
- SAUCE_ACCESS_KEY
21+
- CHROME-BIN=google-chrome
2522

2623
- label: '🔒 Snyk Security Check'
2724
agents:

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v12.18
1+
v12.19

integrations/adobe-analytics/lib/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
* Dependencies
55
*/
66

7+
78
var integration = require('@segment/analytics.js-integration');
89
var dot = require('obj-case');
910
var iso = require('@segment/to-iso-string');

karma.conf-ci.js

Lines changed: 17 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -1,77 +1,34 @@
11
var base = require('./karma.conf');
2-
var testName = require('./package.json').name;
2+
process.env.CHROME_BIN = 'google-chrome';
33

44
module.exports = function(config) {
5-
var customLaunchers = {
6-
Chrome: {
7-
base: 'SauceLabs',
8-
browserName: 'chrome',
9-
version: 'latest'
10-
},
11-
'Chrome-1': {
12-
base: 'SauceLabs',
13-
browserName: 'chrome',
14-
version: 'latest-1'
15-
},
16-
Firefox: {
17-
base: 'SauceLabs',
18-
browserName: 'firefox',
19-
version: 'latest'
20-
},
21-
'Firefox-1': {
22-
base: 'SauceLabs',
23-
browserName: 'firefox',
24-
version: 'latest-1'
25-
},
26-
'Safari-1': {
27-
base: 'SauceLabs',
28-
browserName: 'safari',
29-
version: '11'
30-
},
31-
Safari: {
32-
base: 'SauceLabs',
33-
browserName: 'safari',
34-
version: 'latest'
35-
},
36-
EDGE: {
37-
base: 'SauceLabs',
38-
browserName: 'microsoftedge',
39-
platform: 'Windows 10',
40-
version: 'latest'
41-
},
42-
'EDGE-1': {
43-
base: 'SauceLabs',
44-
browserName: 'microsoftedge',
45-
platform: 'Windows 10',
46-
version: 'latest-1'
47-
}
48-
};
495
base(config);
506

517
config.set({
528
captureTimeout: 180000,
539
browserDisconnectTimeout: 180000,
5410
browserDisconnectTolerance: 3,
5511
browserNoActivityTimeout: 300000,
12+
5613
singleRun: true,
57-
reporters: ['summary'],
58-
browsers: Object.keys(customLaunchers),
59-
customLaunchers: customLaunchers,
14+
15+
reporters: ['progress'],
16+
browsers: ['ChromeHeadlessNoSandbox'],
17+
customLaunchers: {
18+
ChromeHeadlessNoSandbox: {
19+
base: 'ChromeHeadless',
20+
flags: [
21+
'--no-sandbox',
22+
'--user-data-dir=/tmp/chrome-test-profile',
23+
'--disable-web-security',
24+
'--disable-gpu'
25+
]
26+
}
27+
},
28+
frameworks: ['mocha'],
6029
browserstack: {
6130
video: false
6231
},
63-
sauceLabs: {
64-
connectOptions: {
65-
noSslBumpDomains: 'all'
66-
},
67-
testName: testName,
68-
retryLimit: 3,
69-
recordVideo: false,
70-
recordScreenshots: false,
71-
idleTimeout: 600,
72-
commandTimeout: 600,
73-
maxDuration: 5400
74-
},
7532
transports: ['websocket', 'polling'],
7633
port: 9876
7734
});

0 commit comments

Comments
 (0)