Loci runs CI tests locally to make sure your commits will pass such tests before pushing to a remote repository.
Loci currently supports Travis's CI scripts for Python and Go projects. Loci also requires Docker to run tests in a sandbox.
If your current directory has .travis.yml
, run just loci
like
$ loci
If your .travis.yml
specifies more than two runtime versions, Loci will run
those tests palatally. If you want to run tests on a selected one runtime
version, use --select
/-s
flag. For example, the following command runs tests
on only Python 3.6:
$ loci -s 3.6
Here is the help text of the loci
command:
loci [global options] [script file]
If script file isn't given, .travis.yml will be used.
GLOBAL OPTIONS:
--name NAME, -n NAME base NAME of containers running tests.
If not given, containers will be deleted.
--select VERSION, -s VERSION select specific runtime VERSION where tests
running on.
--tag TAG, -t TAG specify a TAG name of the docker image to
be build.
--max-processors value, -p value max processors used to run tests.
--log, -l store logging information to files.
--base TAG, -b TAG use image TAG as the base image.
(default: "ubuntu:latest")
--apt-proxy URL URL for a proxy server of apt repository.
If environment variable APT_PROXY exists,
that value will be used by default.
--pypi-proxy URL URL for a proxy server of pypi repository.
If environment variable PYPI_PROXY exists,
that value will be used by default.
--http-proxy URL URL for a http proxy server.
If environment variable HTTP_PROXY exists,
that value will be used by default.
--https-proxy URL URL for a https proxy server.
If environment variable HTTPS_PROXY exists,
that value will be used by default.
--no-proxy LIST Comma separated URL LIST for which proxies
won't be used.
If environment variable NO_PROXY exists,
that value will be used by default.
--no-build-cache Do not use cache when building the image.
--no-color Omit to print color codes.
--help, -h show help
--version, -v print the version
Loci works with docker. If your environment doesn't have docker, install it first. The minimum required docker version is 1.12.0 (API version: 1.24).
If you're a Homebrew or Linuxbrew user, you can install Loci by the following commands:
$ brew tap jkawamoto/loci
$ brew install loci
To build the newest version of Loci, use go get
command:
$ go get github.com/jkawamoto/loci
Otherwise, compiled binaries are also available in Github.
This software is released under the MIT License, see LICENSES.