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

Setup Travis CI to run our test suite on each pull request automatically #3722

Closed
mattab opened this issue Feb 1, 2013 · 27 comments
Closed
Assignees
Labels
Major Indicates the severity or impact or benefit of an issue is much higher than normal but not critical. Task Indicates an issue is neither a feature nor a bug and it's purely a "technical" change.
Milestone

Comments

@mattab
Copy link
Member

mattab commented Feb 1, 2013

It would be awesome if the build was running automatically for all pull requests.

we would know, when reviewing a pull request, if the code is relatively safe.

Ideally Travis would notify in the pull request page the build result, (and link contributors to the doc explaining how to run tests).

Started in [7826]

Non trivial Feature requests:

  • Download artifacts from Travis (code coverage HTML reports, ...)
  • Run the build for both PDO Mysql and Mysqli
@halfdan
Copy link
Member

halfdan commented Feb 1, 2013

Previous builds failed due to a missing config.ini.php.
Using the before_script command we now copy a configuration file
to config/. We also create a database for tests.
PHPUnit complained about missing XDebug - so this is added.

[7833]

(forgot the refs)

@halfdan
Copy link
Member

halfdan commented Feb 1, 2013

(In [7836]) Syntax error in .travis.yml

refs #3722

@halfdan
Copy link
Member

halfdan commented Feb 1, 2013

(In [7838]) Make travis.sh executable

refs #3722

@halfdan
Copy link
Member

halfdan commented Feb 3, 2013

The PHP 5.5 build is currently throwing a ton of E_DEPRECATED warnings since they are using an outdated version of PHPUnit. I created a ticket in their issue tracker: travis-ci/travis-ci#903

@anonymous-matomo-user
Copy link

In 911cfdb: Removing some more PHP 5.4/5.5 incompatibilities.

refs #3722

@anonymous-matomo-user
Copy link

In 2a0f2dd: Some tests require the sub-directories in tmp/

refs #3722

@anonymous-matomo-user
Copy link

In d7c6a6e: Disabling coverage for now. refs #3722

@anonymous-matomo-user
Copy link

In 8fb7256: We now use a testing matrix that matches three PHP versions
and three testsuites together.

refs #3722

@anonymous-matomo-user
Copy link

In a12a968: Change pwd, enable text coverage (HTML report is no use)

Adjust travis.sh

refs #3722

@mattab
Copy link
Member Author

mattab commented Feb 7, 2013

In f2bd670: Fixed the issue with vagrant & failing tests. The solution is to setup webserver to Piwik.

@mattab
Copy link
Member Author

mattab commented Feb 8, 2013

In f26d1d1: Need this as well to prevent error if piwik uninstalled!

Refs #3722

@mattab
Copy link
Member Author

mattab commented Feb 8, 2013

In 477c338: Fix bug in case REQUEST_URI does not contain the tests path
Refs #3722

@anonymous-matomo-user
Copy link

In 46e62bd: PHPUnit tests for piwik require a running webserver.

travis/setup_webserver.sh will install nginx + php-fpm
and create configuration files.

travis.sh adjusted to reflect changes.

Moved everything to tests/

refs #3722

@anonymous-matomo-user
Copy link

In ed6f6a8: Fix sed command.

refs #3722

@mattab
Copy link
Member Author

mattab commented Feb 8, 2013

In 5e3b044: trying to fix some errors refs #3722

@anonymous-matomo-user
Copy link

In 209c06b: Removing matrix build for now since code coverage report gets useless.

refs #3722

@halfdan
Copy link
Member

halfdan commented Feb 8, 2013

https://travis-ci.org/piwik/piwik/jobs/4658397

I'm sorry but your test run exceeded 50.0 minutes.
One possible solution is to split up your test run.

I'm splitting up test suites again. Not sure why the tests suddenly take so long to run as they were finished within less than 10 minutes before.

@anonymous-matomo-user
Copy link

In 32e25b8: Adding build matrix again. refs #3722

@mattab
Copy link
Member Author

mattab commented Feb 8, 2013

Not sure why the tests suddenly take so long to run

I'm pretty sure I had this problem before. Usually, it completely crashes either the computer (swapping) or php/phpunit. One problem comes when generating & displaying the backtrace for the test failures. Some backtrace are just too huge to be displayed, and result in crash or minutes of waiting. I think this is the problem here. I think that, once all tests pass again, this can be switched back to "full build" to try again.

@mattab
Copy link
Member Author

mattab commented Feb 11, 2013

It would be nice if we could enable build on both PDO Mysql and Mysqli

@mattab
Copy link
Member Author

mattab commented Mar 3, 2013

Is it possible to setup Mysqli on Travis ?

Otherwise this ticket can be closed I think. excellent work!

@halfdan
Copy link
Member

halfdan commented Mar 3, 2013

Should be possible - still on my list.

@mattab
Copy link
Member Author

mattab commented Mar 7, 2013

what a nice tool! it will tremendously help, especially if Jenkins crashes or dies in the future. Kuddos!!

@mattab mattab added this to the 1.11 - Piwik 1.11 milestone Jul 8, 2014
@vvo
Copy link

vvo commented Mar 7, 2015

I'm splitting up test suites again. Not sure why the tests suddenly take so long to run as they were finished within less than 10 minutes before.

Hey, sorry to answer a very old issue, but I have the same timeout problem. How did you fix it? Does every test matrix has it's own timeout?

I cannot find any information on how to properly split test suites in travis.yml.

@asr
Copy link

asr commented Apr 22, 2015

I cannot find any information on how to properly split test suites in travis.yml.

Neither do I. Did you find some information @vvo?

@vvo
Copy link

vvo commented Apr 22, 2015

yes, use matrixes. timeout is per job in the matrix!

@asr
Copy link

asr commented Apr 22, 2015

Thanks!

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Major Indicates the severity or impact or benefit of an issue is much higher than normal but not critical. Task Indicates an issue is neither a feature nor a bug and it's purely a "technical" change.
Projects
None yet
Development

No branches or pull requests

5 participants