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

tests: test on Linux, macOS and Windows #11538

Merged
merged 9 commits into from Nov 20, 2018
Merged

tests: test on Linux, macOS and Windows #11538

merged 9 commits into from Nov 20, 2018

Conversation

DanielRuf
Copy link
Contributor

@DanielRuf DanielRuf commented Oct 14, 2018

Description

Test on Linux, macOS and Windows. See https://blog.travis-ci.com/2018-10-11-windows-early-release

Types of changes

  • Documentation
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (anything that would change an existing functionality)
  • Maintenance (refactor, code cleaning, development tools...)

Checklist

  • I have read and follow the CONTRIBUTING.md document.
  • The pull request title and template are correctly filled.
  • The pull request targets the right branch (develop or develop-v...).
  • My commits are correctly titled and contain all relevant information.
  • I have updated the documentation accordingly to my changes (if relevant).
  • I have added tests to cover my changes (if relevant).

@DanielRuf
Copy link
Contributor Author

@ncoden not sure if this should be unencrypted https://travis-ci.org/zurb/foundation-sites/jobs/441389318#L441

Copy link
Contributor

@ncoden ncoden left a comment

Choose a reason for hiding this comment

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

With this new configuration, we are starting tests with:

  • Headless Chrome with Node lts/boron on windows, linux and macOS
  • Headless Chrome with Node lts/carbon on windows, linux and macOS
  • Headless Chrome with Node stable on windows, linux and macOS
  • 18 browsers via Browserstack with Node stable on windows, linux and macOS

So tests are run 63 times. Are you sure this is what you want to do ?

@DanielRuf
Copy link
Contributor Author

DanielRuf commented Oct 15, 2018

  • 18 browsers via Browserstack with Node stable on windows, linux and macOS

This is still WIP.
We might change this one to run only on one host.

@ncoden
Copy link
Contributor

ncoden commented Oct 15, 2018

I don't understand how it would be useful (or useful enough to slow tests) to be tested on several versions of Node on Linux, macOS and Window.

We specify the Foundation package as compatible with node >= 6 so it makes sense to test several versions of Node. But it is up to the Node maintainers to test it on all plateform to ensure it behave the same.

There is some developers tools that embed binaries and can be plateform-specific. But does it worth it to test all this on every pull request ?

@DanielRuf
Copy link
Contributor Author

I don't understand how it would be useful (or useful enough to slow tests) to be tested on several versions of Node on Linux, macOS and Window.

Because there are differences between the platforms and dependencies.

@DanielRuf
Copy link
Contributor Author

But it is up to the Node maintainers to test it on all plateform to ensure it behave the same.

Do not forget the dependencies.

@ncoden
Copy link
Contributor

ncoden commented Oct 15, 2018

Ok I see. Plateform-specific dependencies (like Sass).

In that case, what about:

  • Headless Chrome with Node lts/boron on Linux
  • Headless Chrome with Node lts/carbon on Linux
  • Headless Chrome with Node lts/dubnium on Linux
  • Headless Chrome with Node stable on Linux
  • Headless Chrome with Node stable on macOS
  • Headless Chrome with Node stable on Window
  • 18 browsers via Browserstack with Node stable on Linux

Also I would prefer to stay with lts versions instead of 8/10. It's more explicit that we only support long-term versions (6.14.x and not 6.0.x).

@ncoden
Copy link
Contributor

ncoden commented Oct 15, 2018

@DanielRuf The npm installation is failing on Windows: https://travis-ci.org/zurb/foundation-sites/jobs/441821489#L296

@DanielRuf
Copy link
Contributor Author

I know, this is an issue with nvs and the Windows support is still in Beta.

Also all major Node versions should be checked on all platforms. Time does not matter for the testsuite.

@DanielRuf
Copy link
Contributor Author

Also lts/* does not work with nvs in many cases (was fixed now) but 6, 8 and 10 is better to understand as new LTS will get other names so it makes not much sense to use lts/*.

@DanielRuf
Copy link
Contributor Author

Also I would prefer to stay with lts versions instead of 8/10

These are LTS branches / releases. Every even release branch will become LTS, every odd one is shortliving (5, 7, 9).

@DanielRuf
Copy link
Contributor Author

6 will use the latest release of Node.js 6. Also keep in mind that this is just for CI which has always the latest branch releases.

@DanielRuf
Copy link
Contributor Author

Also see https://travis-ci.community/t/windows-instances-hanging-before-install/250/9

And it seems the Windows builds leak probably secure env vars.

@DanielRuf
Copy link
Contributor Author

See jasongin/nvs#66 (basically npm is broken on Windows in specific cases).

@ncoden ncoden added the WIP label Oct 16, 2018
@ncoden
Copy link
Contributor

ncoden commented Oct 20, 2018

@DanielRuf Let me know when you gets it working on Window 😉 (and good luck!)

@ncoden
Copy link
Contributor

ncoden commented Oct 20, 2018

@DanielRuf We could use Travis "Stages" too. https://docs.travis-ci.com/user/build-stages

Like in the first stage Tests:

  • Unit tests (Linux + Node stable)
  • Unit tests (Linux + Node 10)
  • Unit tests (Linux + Node 8)

Then if it successes, in a second stage Additional Tests:

  • BrowserStack (Linux + Node stable)
  • Unit tests (Linux + Node 6)
  • Unit tests (macOS + Node stable)
  • Unit tests (macOS + Node 10)
  • Unit tests (macOS + Node 8)
  • Unit tests (macOS + Node 6)
  • Unit tests (Windows + Node stable)
  • Unit tests (Windows + Node 10)
  • Unit tests (Windows + Node 8)
  • Unit tests (Windows + Node 6)

Travis doens't run more than 3 job in parallel so it would not slow down tests and stop the Travis build sooner if any test fails. I moved BrowserStack to first position because it takes 5 times as long to finish (so others tests will run in parallel). What do you think?

@DanielRuf
Copy link
Contributor Author

Currently just the puppeteer issue exists (the dll issue), the remaining steps work now.

@ncoden
Copy link
Contributor

ncoden commented Oct 28, 2018

@DanielRuf What's the status of this?

@DanielRuf
Copy link
Contributor Author

@DanielRuf What's the status of this?

Still the same, WIP.

@DanielRuf
Copy link
Contributor Author

The Puppeteer dependency is not compatible as you can see in the log of the failing build.

@ncoden
Copy link
Contributor

ncoden commented Nov 18, 2018

Tests fails because a process continue to run in Windows. It may be Yarn. https://travis-ci.community/t/build-doesnt-finish-after-completing-tests/288/

Copy link
Contributor

@ncoden ncoden left a comment

Choose a reason for hiding this comment

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

@DanielRuf I resolved conflicts, fixed the Yarn issue that prevented the build to finish and added cache for it. LGTM 👍. Say a word and it's merged 😉

@ncoden ncoden merged commit 4e8ad74 into foundation:develop Nov 20, 2018
- 6
- 8
- 10
- 11
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Let's fail early and use node instead of 11 or what do you think @ncoden?

Copy link
Contributor

@ncoden ncoden Nov 20, 2018

Choose a reason for hiding this comment

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

We have 1 year to think about this 😄

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Well, 12 is scheduled for 2019-04-23 ;-)

@DanielRuf DanielRuf deleted the tests/test-linux-macos-windows branch November 20, 2018 11:27
ncoden added a commit that referenced this pull request Jan 11, 2019
… for v6.5.0

d0f6c3b tests: test on Linux, macOS and Windows
8273493 tests: use Node.js 6, 8 and 10
78b516f tests: run Browswestack tests only on one platform
6234087 ci: use Yarn
e457b19 chore: downgrade mocha-headless-chrome for now
b453e55 fix: downgrade doiuse to support Node.js 6
0c92518 fix: disable Yarn GPG so it doesn't prevent the Travis build to finish
3f3c331 chore: cache Yarn in Travis

Co-Authored-By: Daniel Ruf <[email protected]>
Co-Authored-By: Nicolas Coden <[email protected]>
Signed-off-by: Nicolas Coden <[email protected]>
@ncoden ncoden mentioned this pull request Jan 12, 2019
11 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants