Package: easyci
Note: EasyCI only works with git repositories.Never worry about checking in broken code again. No need to maintain a CI server. No need to shell out ridiculous amount of money for your personal project. EasyCI puts your mind at ease, like a good CI service, but without all the extra costs.EasyCI operates via gitpre-commitandpre-pushhooks to ensure that your code passes tests before letting you commit/push.$gitcommitRunningtest:flake8Passed[masterb2e6fa1]testcommit1filechanged,2insertions(+),2deletions(-)EasyCI also makes sure not to run tests redundantly. If you ran tests before usingeci test, and no files have changed, then it does not try to run tests again.$ecitestRunningtest:flake8Passed$gitcommitOKFilesnotchanged[masterb2e6fa1]testcommit1filechanged,2insertions(+),2deletions(-)This means that if you run tests regularly as part of your workflow, there is effectively no efficiency cost in using EasyCI, yet you can rest easy knowing that if you forgot to run tests, you will not be allowed to commit/push.EasyCI is designed to shift the burden of test running away from you. To that end, it is possible to have EasyCI monitor your project for changes and automatically run tests, so that by the time you want to commit your changes, your tests would have already been run. Do this in a separate shell session:$# from anywhere in your project$eciwatchWatchingdirectory`/path/to/project`.Usectrl-ctostop.Installation/SetupFirst, install EasyCI usingpip.pipinstalleasyciNext, setup EasyCI for your project.cd/path/to/projecteciinitThis will install the necessary git hooks and put a trivial config fileeci.yaml. You should modify the config file to actually run your tests.Running TestsTests are run automatically by git’spre-commitandpre-pushhooks. To trigger tests manually:# from anywhere in your projectecitestCollecting Test ResultsEasyCI preserves the state of your project by making a copy of your project usingrsyncto a temporary directory. In some cases, you do want the files generated by your tests. For example, if your tests generate code coverage data, or other tests data, you will want the options to copy those files from the temporary directory back to your project directory. This can be done by the configcollect_results.As an example, the following config will copy everything under the subdirectoryhtmlcov, which in this case contains the code coverage report.tests:-coverage run -m py.test && coverage htmlcollect_results:-htmlcov/***For more information on the pattern format forcollect_results, see the man page forrsync, which is used internally to copy the test results.ConfigThe config lives in a file at the root of the repository,eci.yaml.keytypeDescriptiontestsList[string]This is a list of commands to run tests.history_limitintThe number of passing test runs to remember.collect_resultsList[string]Copy files matching these patterns back to the project. The patterns must be in anrsync-compatible format.CommandsAll commands should be run inside the target repository.eci initInitialize the project for use with EasyCI. This installs the necessary git hooks (pre-commit + pre-push) and add a config file if one does not already exists.eci testRun tests. If a passing test run is found in the tests run history, then this does not run any tests.eci watchWatch the current repository for changes and automatically run tests.eci gcRuns housekeeping tasks to free up space. For now, this only removes saved but unused (unreachable) test results.eci clear-historyClear tests run history. History is normally used to keep track of whether a test has been run for a specific state of the project, to avoid running tests redundantly. This command clears the history, causing the nexteci testcommand to always run tests.