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

Add a CI #560

Closed
FagnerMartinsBrack opened this issue May 14, 2016 · 4 comments
Closed

Add a CI #560

FagnerMartinsBrack opened this issue May 14, 2016 · 4 comments
Milestone

Comments

@FagnerMartinsBrack
Copy link
Member

We need to add a continuous integration service that runs the test whenever there is a new Pull Request. Only one, just to start, probably Travis CI that is free for Open Source.

@FagnerMartinsBrack FagnerMartinsBrack added this to the v0.6.0 milestone May 21, 2016
@FagnerMartinsBrack
Copy link
Member Author

FagnerMartinsBrack commented May 21, 2016

Here is my spike on making Travis working for this repo:

In order to make Travis CI working we need to make the tests run on Linux, currently it seems the chrome package we are using to run chrome locally in the command line only works in Mac.

I have tried running the QUnit tests using Karma locally, but the complexity and amount of code seems too high. Therefore, I am looking into a simpler solution that doesn't require the project to figure out how to make the tests work locally in Windows, Mac and Linux Ubuntu (for Travis CI).

I have tried drone.io as @bartaz mentioned in his comment, but after I created the account I noticed they use outdated node versions 0.8 and 0.10 only. We can't rely in a service that doesn't update the node version because there are lots of packages we might depend upon that doesn't work in those versions anymore and we can stop receiving important updates and features that will stop the progress.

I have tried using gulp, so that we can find some plugin that can run the tests out of the box inside a service (like Sauce Labs*). I have found gulp-qunit, but unfortunately it doesn't work because it runs in PhantomJS and Phantom JS don't support CSS 3D transforms, not even PhantomJS 2. When running gulp-qunit, the QUnit integration tests fail locally:

➜  impress.js git:(ci) ✗ ./node_modules/.bin/gulp test-integration
[16:47:16] Using gulpfile ~/Git/impress.js/gulpfile.js
[16:47:16] Starting 'test-integration'...
[16:47:19] Testing core_tests.html
[16:47:19] Test failed: Initialization: Attributes
[16:47:19] Failed assertion: canvas.style.transform initialized correctly, expected: rotateZ(0deg) rotateY(0deg) rotateX(0deg) translate3d(1000px, 0px, 0px), but was: undefined
[16:47:19] at file:////Users/fagnerbrack/Git/impress.js/test/core_tests.js:50:25
[16:47:19] Failed assertion: canvas.style.transformOrigin initialized correctly, expected: left top 0px, but was: undefined
[16:47:19] at file:////Users/fagnerbrack/Git/impress.js/test/core_tests.js:54:25
[16:47:19] Failed assertion: canvas.style.transformStyle initialized correctly, expected: preserve-3d, but was: undefined
[16:47:19] at file:////Users/fagnerbrack/Git/impress.js/test/core_tests.js:58:25
[16:47:19] 
[16:47:19] Took 3071ms to run 22 tests. 19 passed, 3 failed.
[16:47:19] gulp-qunit: ✖ QUnit assertions failed in core_tests.html
[16:47:19] 'test-integration' errored after 3.47 s
[16:47:19] Error in plugin 'gulp-qunit'
Message:
    Command failed: /Users/fagnerbrack/Git/impress.js/node_modules/phantomjs2/lib/phantom/bin/phantomjs /Users/fagnerbrack/Git/impress.js/node_modules/qunit-phantomjs-runner/runner.js file:////Users/fagnerbrack/Git/impress.js/test/core_tests.html

Details:
    killed: false
    code: 1
    signal: null
    cmd: /Users/fagnerbrack/Git/impress.js/node_modules/phantomjs2/lib/phantom/bin/phantomjs /Users/fagnerbrack/Git/impress.js/node_modules/qunit-phantomjs-runner/runner.js file:////Users/fagnerbrack/Git/impress.js/test/core_tests.html

I am considering creating a new gulp plugin or make a PR in existing ones for running chrome instead of PhantomJS (jonkemp/gulp-qunit#31), I am just not sure the amount of work to get that thing done. Any useful ideas on how to make tests working in Linux Ubuntu (for Travis CI) with the least amount of effort will be much appreciated.

* The Sauce approach is how it is already being done with js-cookie, although it uses grunt instead of gulp and Sauce Labs is known to become unstable sometimes (even bootstrap is looking for changing it, see twbs/bootstrap#18754).

@FagnerMartinsBrack
Copy link
Member Author

FagnerMartinsBrack commented Jun 16, 2016

After #566 this might become easier. I have received some tips to use CircleCI instead of Travis, seems to be better at running Chrome. Need to take a look into that.

@nkbt nkbt mentioned this issue Jun 23, 2016
4 tasks
@nkbt
Copy link
Contributor

nkbt commented Jun 23, 2016

Added some PR's related to this, @FagnerMartinsBrack

@FagnerMartinsBrack
Copy link
Member Author

Fixed by #568.

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 a pull request may close this issue.

2 participants