Skip to content
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

Merged
merged 2 commits into from
Nov 9, 2020
Merged

feat: support any ci #37

merged 2 commits into from
Nov 9, 2020

Conversation

brandonocasey
Copy link
Contributor

@brandonocasey brandonocasey commented Nov 4, 2020

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

  • Removes support for the detectBrowsers option which really didn't do anything anyway.
  • Removes teamcityLaunchers and travisLauncher in favor of ciLaunchers
  • Allows ci/browserstack launchers to be overridden by passing in --browsers in to karma.

Object.keys(libPkg.dependencies).forEach(function(p) {
if ((/^karma-/).test(p)) {
karmaPlugins.push(require(p));
Object.keys(libPkg.dependencies).forEach(function(pkgName) {
Copy link
Contributor Author

@brandonocasey brandonocasey Nov 5, 2020

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.

base: 'ChromeHeadless',
flags: ['--no-sandbox']
// detect if we are being run in "server mode" with --no-single-run
const inServerMode = () => {
Copy link
Contributor Author

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}) => {
Copy link
Contributor Author

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 = () => {
Copy link
Contributor Author

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`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why remove detectBrowsers?

Copy link
Contributor Author

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.

Copy link
Member

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.

Copy link
Member

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?

Copy link
Contributor Author

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.

Copy link
Member

@misteroneill misteroneill left a 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. 😉

@brandonocasey brandonocasey merged commit 1af972d into master Nov 9, 2020
@brandonocasey brandonocasey deleted the feat/support-any-ci branch November 9, 2020 21:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants