| 1 | = CI Server = |
| 2 | |
| 3 | == Unittests on every PR == |
| 4 | Using [https://travis-ci.org/ Travis-CI], [wiki:/DeveloperGuidelines/Testing#UnitTests UnitTests] are run on every new pull request made in the !GitHub repository of Eden and then the status of the pull request is updated. |
| 5 | |
| 6 | === How PRs are tested === |
| 7 | When a pull request is opened, Travis CI receives a pull request notification from !GitHub. This notification is turned into a build and run. These are the steps that are followed. |
| 8 | |
| 9 | 1. Web2py is installed from [http://web2py.com/examples/static/web2py_src.zip web2py src]. |
| 10 | 2. A new requirements.txt file is generated from [https://github.com/flavour/eden/blob/master/optional_requirements.txt optional_requirements.txt] and [https://github.com/flavour/eden/blob/master/requirements.txt requirements.txt]. In future, if any other requirements.txt (for eg: for [wiki:/DeveloperGuidelines/EdenTest EdenTest]) is also given as argument, that will also be incorporated in the generated_requirements.txt file. Note: generated_requirements.txt is not in the main branch and not in version control. Also, packages like matplotlib are installed from the binaries as installing them from pip, which builds first, takes a lot of time. |
| 11 | 3. Eden is installed. |
| 12 | 4. 000_config.py is configured based on the enviorment variables. As of now, all the database systems supported by Eden are tested, namely, mysql, postgres and sqlite3. |
| 13 | 5. Prepopulation |
| 14 | 6. !UnitTests are run |
| 15 | |
| 16 | Please see '''.travis.yml''' for the configuration and the files inside '''ci_bin''' directory for the scripts used above. |
| 17 | |
| 18 | Along the way, commit status of the commits involved is updated, which in turn shows on !GitHub as either a warning that the build is still running, that the pull request should be merged with caution because the build failed, or that it can be merged safely because the build was successful. |
| 19 | |
| 20 | Travis CI builds a pull request when it's first opened and when commits are added to the pull request throughout its lifetime. |
| 21 | |
| 22 | Rather than test the commits from the branches the pull request is sent from, it tests the merge between the origin and the upstream branch |