Skip to content

Commit

Permalink
Merge pull request #51 from ckeditor/t/ckeditor5/1742
Browse files Browse the repository at this point in the history
Tests: Removed the BrowserStack integration from this repository (see ckeditor/ckeditor5#1742).
  • Loading branch information
oleq authored Jun 13, 2019
2 parents f34c213 + 7f7aaa7 commit 32c5613
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 76 deletions.
6 changes: 1 addition & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,4 @@ before_install:
install:
- yarn install
script:
- yarn run test --coverage && yarn run test --browsers=Firefox,BrowserStack_Edge,BrowserStack_Safari
env:
global:
- secure: cUYeLfFNWafic3oZRy7ai2Ok08BeRIUsZvSyyUq8KBAJ2SyhjzDawWzxuGvqGjg6UsU73pao11q9rr2jA2m6bEcxx3XeO/TnSVTW/bIiEmDgsubcVG6vjNzissJBLJBd+UqXHbb8tFjUvmlKsk7bAeM19sh4GOQQ0VxuphZLGrOqXSb+w1hW0pjiA8nBTUoTt0LgDLH0cLaKH0XI7/E5TxEo4ne4Gr+ibd0jZiE/vkHhZ/S84u+zedsbNDP7pNgjhW/EvNePdkB1gGlJir92C33J0GYXGfjiAwhLYkrqIc07gHpCPevcxEvVJbT5B6w4ELUdLy6fbjB0ZC3cJkxTLXnmCUCwL2keqwmc/arwmIguLfjJCMKuZIssivA7fwKJMuOtJV6U8CzJsNHVAG35pfoR5jyt4DIjUNr2AgW72krIkEKCD/r1lxGlkIYY864ZHkfbqLa/YTgR6FRPCeoYC8WDbf+k1tA/X3bmGEYEWzChkuFkWdCQUi/LgSbDaEQ1BH36WKp0APXKoPoDCAZQqjfkgu8NkGcvnM84Ll4QJIw4vwbZSAJJGEQSS63gNsC4xglyqqLVq0w/uFhekQT2iHaLRocgsMPvYCldAuSA8zsPUHaiUb24BNllTVoHAXvAzdzSmrkllqI3Ew0K1butZP9S8sJnumfUCs9NUVuW3+A=
- secure: lmMFP7ICdjof81wpx5flPdS+m+5CtKNG86fikvOvcMfo6FhiIy87KeNViyWvzJ/4zpf/i9hl+JjOnERG1TN4pK0J/jhtr/SfTKS3FKjexhSdW4eASE1gqCSC4S0nSNJ11kmU19FRb82kcM1G+BlqVSikBfFq0JFSQMjq4yrEAcpKhzmRmTa/wWzqEadNkT+m8c8qanNWbUDyKy7z+3iSvq5fU23tckwovs+jQ/AYjG/wg1ojNG7KLnOBoV5J4lSwrdXE4ttsFZrvZ9WDN09XMs5tAqJYSGDg1RgGHPJqyh6UYBRV7589v+/gr+cTFJU6pXTatk/vwI3f4OjBfYDBzTjZ7pFr9oNbPLYQGWu8vYvqlwy5b8tQzYiQ95PYKGIa06T92QttN4uWRI8+OtLwv/OdmZxwjwTLWB0Tr04MMzbmFVUB/urqy3t/mgZlKE03JbIJGyzT5uk4pjf6RXjpF3b3Njay+e2X4Xcxnml8cRgxR19lIMdaoexli72QX2KmIghvT2m5NvsCydRSeUFDqHAMXYUG5pC8BAt5/wphsJfNk3Uds5cedZh0/oorYV3ea/LtTaTbJ6WtQgUvA6BUpL18TVkQj4zPihstbFmEXaMEvBML6PiftXXu/g22qrhzBnSiW8uAfJmvF+A+mfdAQ7jo9V6CoXAZi/wvZBzE8mA=
- yarn run test --coverage && yarn run test --browsers=Firefox
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ CKEditor 5 inspector
[![Join the chat at https://gitter.im/ckeditor/ckeditor5](https://badges.gitter.im/ckeditor/ckeditor5.svg)](https://gitter.im/ckeditor/ckeditor5?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![npm version](https://badge.fury.io/js/%40ckeditor%2Fckeditor5-inspector.svg)](https://www.npmjs.com/package/@ckeditor/ckeditor5-inspector)
[![Build Status](https://travis-ci.org/ckeditor/ckeditor5-inspector.svg?branch=master)](https://travis-ci.org/ckeditor/ckeditor5-inspector)
[![BrowserStack Status](https://automate.browserstack.com/automate/badge.svg?badge_key=d3hvenZqQVZERFQ5d09FWXdyT0ozVXhLaVltRFRjTTUyZGpvQWNmWVhUUT0tLUZqNlJ1YWRUd0RvdEVOaEptM1B2Q0E9PQ==--c9d3dee40b9b4471ff3fb516d9ecf8d09292c7e0)](https://automate.browserstack.com/public-build/d3hvenZqQVZERFQ5d09FWXdyT0ozVXhLaVltRFRjTTUyZGpvQWNmWVhUUT0tLUZqNlJ1YWRUd0RvdEVOaEptM1B2Q0E9PQ==--c9d3dee40b9b4471ff3fb516d9ecf8d09292c7e0)
[![Coverage Status](https://coveralls.io/repos/github/ckeditor/ckeditor5-inspector/badge.svg?branch=master)](https://coveralls.io/github/ckeditor/ckeditor5-inspector?branch=master)
<br>
[![Dependency Status](https://david-dm.org/ckeditor/ckeditor5-inspector/status.svg)](https://david-dm.org/ckeditor/ckeditor5-inspector)
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@
"husky": "^1.3.1",
"istanbul-instrumenter-loader": "^3.0.1",
"karma": "^4.0.0",
"karma-browserstack-launcher": "^1.3.0",
"karma-chai": "^0.1.0",
"karma-chrome-launcher": "^2.2.0",
"karma-coverage": "^1.1.2",
Expand Down
75 changes: 6 additions & 69 deletions scripts/utils/getkarmaconfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,18 +58,6 @@ module.exports = function getKarmaConfig() {
CHROME_LOCAL: {
base: 'Chrome',
flags: [ '--disable-background-timer-throttling' ]
},
BrowserStack_Edge: {
base: 'BrowserStack',
os: 'Windows',
os_version: '10',
browser: 'edge'
},
BrowserStack_Safari: {
base: 'BrowserStack',
os: 'OS X',
os_version: 'High Sierra',
browser: 'safari'
}
},

Expand All @@ -84,17 +72,6 @@ module.exports = function getKarmaConfig() {
}
};

if ( shouldEnableBrowserStack() ) {
karmaConfig.browserStack = {
username: process.env.BROWSER_STACK_USERNAME,
accessKey: process.env.BROWSER_STACK_ACCESS_KEY,
build: getBuildName(),
project: 'ckeditor5'
};

karmaConfig.reporters = [ 'dots', 'BrowserStack' ];
}

if ( options.watch ) {
karmaConfig.autoWatch = true;
karmaConfig.singleRun = false;
Expand Down Expand Up @@ -160,53 +137,13 @@ function getBrowsers( browsers ) {
return null;
}

const newBrowsers = browsers
.map( browser => {
if ( browser !== 'Chrome' ) {
return browser;
}

return process.env.TRAVIS ? 'CHROME_TRAVIS_CI' : 'CHROME_LOCAL';
} );

if ( shouldEnableBrowserStack() ) {
return newBrowsers;
}

// If the BrowserStack is disabled, all browsers that start with a prefix "BrowserStack" should be filtered out.
// See: https://github.com/ckeditor/ckeditor5-dev/issues/358 and https://github.com/ckeditor/ckeditor5-dev/issues/402.
return newBrowsers.filter( browser => !browser.startsWith( 'BrowserStack' ) );
}

// Formats name of the build for BrowserStack. It merges a repository name and current timestamp.
// If env variable `TRAVIS_REPO_SLUG` is not available, the function returns `undefined`.
//
// @returns {String|undefined}
function getBuildName() {
const repoSlug = process.env.TRAVIS_REPO_SLUG;

if ( !repoSlug ) {
return;
}

const repositoryName = repoSlug.split( '/' )[ 1 ].replace( /-/g, '_' );
const date = new Date().getTime();

return `${ repositoryName } ${ date }`;
}

function shouldEnableBrowserStack() {
if ( !process.env.BROWSER_STACK_USERNAME ) {
return false;
}

if ( !process.env.BROWSER_STACK_ACCESS_KEY ) {
return false;
}
return browsers.map( browser => {
if ( browser !== 'Chrome' ) {
return browser;
}

// If the repository slugs are different, the pull request comes from the community (forked repository).
// For such builds, BrowserStack will be disabled. Read more: https://github.com/ckeditor/ckeditor5-dev/issues/358.
return ( process.env.TRAVIS_EVENT_TYPE !== 'pull_request' || process.env.TRAVIS_PULL_REQUEST_SLUG === process.env.TRAVIS_REPO_SLUG );
return process.env.TRAVIS ? 'CHROME_TRAVIS_CI' : 'CHROME_LOCAL';
} );
}

/**
Expand Down

0 comments on commit 32c5613

Please sign in to comment.