Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

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

Closed
mattab opened this Issue · 27 comments

5 participants

@mattab
Owner

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
Collaborator

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
Collaborator

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

refs #3722

@halfdan
Collaborator

(In [7838]) Make travis.sh executable

refs #3722

@halfdan
Collaborator

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-piwik-user

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

refs #3722

@anonymous-piwik-user

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

refs #3722

@anonymous-piwik-user

In d7c6a6e: Disabling coverage for now. refs #3722

@anonymous-piwik-user

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

refs #3722

@anonymous-piwik-user

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

Adjust travis.sh

refs #3722

@mattab
Owner

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

  • added documentation in the test output to prevent useless test failures messages
  • I just write out the message and exit. Not sure if that's the proper way to do this
  • also added help text in case user hasn't up

    Refs #3722

@mattab
Owner

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

Refs #3722

@mattab
Owner

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

@anonymous-piwik-user

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-piwik-user

In ed6f6a8: Fix sed command.

refs #3722

@mattab
Owner

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

@anonymous-piwik-user

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

refs #3722

@halfdan
Collaborator

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-piwik-user

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

@mattab
Owner

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
Owner

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

@mattab
Owner

Is it possible to setup Mysqli on Travis ?

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

@halfdan
Collaborator

Should be possible - still on my list.

@mattab
Owner

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
@halfdan halfdan was assigned by mattab
@vvo
vvo commented

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

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

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

@asr

Thanks!

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.