-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: support any ci #37
Conversation
d761b1a
to
3a7cd3d
Compare
3a7cd3d
to
23ba3d5
Compare
Object.keys(libPkg.dependencies).forEach(function(p) { | ||
if ((/^karma-/).test(p)) { | ||
karmaPlugins.push(require(p)); | ||
Object.keys(libPkg.dependencies).forEach(function(pkgName) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
support scoped packages. noticed this when I tried to add edge/edgium support but there are only scoped packages. I think this fix should stay even though I backed out edge/edgium support.
891b3f3
to
835f01c
Compare
base: 'ChromeHeadless', | ||
flags: ['--no-sandbox'] | ||
// detect if we are being run in "server mode" with --no-single-run | ||
const inServerMode = () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved this to it's own function.
// 1. if we are in ci and no browsers are passed in | ||
// 2. We are in server mode and serverBrowsers is set | ||
// 3. We are not in server mode and browsers is set | ||
const normalizeBrowsers = ({serverMode, browsers, settings}) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved this to its own function.
browserstackLaunchers, | ||
teamcityLaunchers, | ||
// default settings | ||
const getDefaults = () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved defaults to their own function.
@@ -126,18 +123,7 @@ module.exports = function(config) { | |||
> Type: `Boolean` | |||
> Default: `true` | |||
|
|||
If we should prefer running headless browsers. This will change the defaults for `travisLaunchers` as well as automatic browser detection. Make sure to handle this in [`browsers`](###browsers) | |||
|
|||
### `detectBrowsers` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why remove detectBrowsers?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We only detect browsers when browsers are not explicitly defined. It seems rather pointless to skip detect browsers when no browsers are set as nothing will run, causing an error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, makes sense. Probably worth documenting that.
Plus, since this change is already a breaking change there's no issue in removing an option. Though, should this be a breaking change? I guess it probably doesn't matter that much since the functionality is the same, and we're not looking to add other functionality that could be useful to travis/TC items directly yet.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think for docs maybe something like detect browsers automatically if no browsers were configured
under the browsers
option?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah that makes sense I will add that under the browsers option. I think this pull request was going to be a breaking change anyway just to be safe.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM so long as we test with TeamCity, specifically. 😉
Makes this project more generic since travis has had some major slow downs for open source and we are switching to github actions for ci.
BREAKING CHANGES
detectBrowsers
option which really didn't do anything anyway.--browsers
in to karma.