Skip to main content

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 git pre-commit and pre-push hooks to ensure that your code passes tests before letting you commit/push.

$ git commit
Running test: flake8
Passed
[master b2e6fa1] test commit
1 file changed, 2 insertions(+), 2 deletions(-)

EasyCI also makes sure not to run tests redundantly. If you ran tests before using eci test, and no files have changed, then it does not try to run tests again.

$ eci test
Running test: flake8
Passed
$ git commit
OK Files not changed
[master b2e6fa1] test commit
1 file changed, 2 insertions(+), 2 deletions(-)

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
$ eci watch
Watching directory `/path/to/project`. Use ctrl-c to stop.

Installation/Setup

First, install EasyCI using pip.

pip install easyci

Next, setup EasyCI for your project.

cd /path/to/project
eci init

This will install the necessary git hooks and put a trivial config file eci.yaml. You should modify the config file to actually run your tests.

Running Tests

Tests are run automatically by git’s pre-commit and pre-push hooks. To trigger tests manually:

# from anywhere in your project
eci test

Collecting Test Results

EasyCI preserves the state of your project by making a copy of your project using rsync to 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 config collect_results.

As an example, the following config will copy everything under the subdirectory htmlcov, which in this case contains the code coverage report.

tests:
    - coverage run -m py.test && coverage html
collect_results:
    - htmlcov/***

For more information on the pattern format for collect_results, see the man page for rsync, which is used internally to copy the test results.

Config

The config lives in a file at the root of the repository, eci.yaml.

key

type

Description

tests

List[string]

This is a list of commands to run tests.

history_limit

int

The number of passing test runs to remember.

collect_results

List[string]

Copy files matching these patterns back to the project. The patterns must be in an rsync-compatible format.

Commands

All commands should be run inside the target repository.

eci init

Initialize 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 test

Run tests. If a passing test run is found in the tests run history, then this does not run any tests.

eci watch

Watch the current repository for changes and automatically run tests.

eci gc

Runs housekeeping tasks to free up space. For now, this only removes saved but unused (unreachable) test results.

eci clear-history

Clear 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 next eci test command to always run tests.

Metadata

Release files for easyci 2.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for easyci 2.0.1
File Size Uploaded
easyci-2.0.1.tar.gz 19.7 kB Details

Release files / easyci-2.0.1.tar.gz

Download URL easyci-2.0.1.tar.gz
Size 19.7 kB
Tags Source
SHA-256 checksum
How to use checksums
7d929b1429680d583ad3eb7e05f0e77124293af8623fedad4f5a70c1063aa5cf
BLAKE2b-256 checksum
How to use checksums
83d2dff24bb49e44020a189f43e3e8abe9fa686b32056bb87419b4e6268d3a47
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

2.0.1 This release

1 release file

2.0.0

1 release file

1.6.2

1 release file

1.6.0

1 release file

1.5.0

1 release file

1.4.0

1 release file

1.3.0

1 release file

1.2.1

1 release file

1.2.0

1 release file

1.1.0

1 release file

1.0.1

1 release file

1.0.0

1 release file

0.5.0

1 release file

0.4.3

1 release file

0.4.2

1 release file

0.4.1

1 release file

0.4.0

1 release file

0.3.2

1 release file

0.3.1

1 release file

0.3.0

1 release file

0.2.2

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page