travis(8)

NAME
travis - TracisCi local emulator

SYNOPSIS
travis [-h][-A regex][-BC][-c file][-D number][-EFfjk][-L number][-l dir][-Mmn][-O git-org][-pqr][-S false|true][-T regex][-Vv][-X 0|1][-Y file][-y pyver][-Z] action sub sub2 Travis-ci emulator for local developer environment
Action may be: (help,emulate,force-lint,lint,force-test,test,force-testdeps,testdeps,force-translate,translate,chkconfig,parseyaml,show-log,show-color,summary,wep-db)

DESCRIPTION
travis can emulate TravisCi parsing the .travis.yml file in local Linux machine. You can test your application before pushing code to github.com web site.

Travis emulator can creates all the builds declared in .travis.yml; all builds are executed in sequential way. The directory ~/travis_log (see -l switch) keeps the logs of all created builds. Please note that log file is a binary file with escape ANSI screen code.
If you want to see the log use one of following command:

    travis show-log

A travis build executes the following steps:

    * Initialize from local .travis.conf (not in travis-ci.org)
    * Optional install packages apt addons (emulator does not install, it makes just the check)
    * Optional install packages cache
    * Set global values env global
    * Execute code from before_install
    * Execute matrix initialization, included python version
    * Execute build code from install
    * Execute build code from before_script
    * Execute build code from script
    * TravisCi executes build from before_cache (only if cache is effective, not emulated)
    * TravisCi executes build code from after_success (emulated) or after_failure (not emulated)
    * TravisCi execute optional code before_deploy (only if deployment is effective, not emulated)
    * TravisCi execute optional code deploy (not emulated)
    * TravisCi executes optional code after_deploy (only if deployment is effective, not emulated)
    * TravisCi executes code after_script (not emulated)
    * Wep from local .travis.conf (not in travis-ci.org)
Read furthermore info read travis job lifecycle (https://docs.travis-ci.com/user/job-lifecycle/)

Action is one of:
    * help
    * emulate
    * force-lint
    * lint
    * force-test
    * test
    * chkconfig
    * parseyaml
    * show-color
    * show-log
    * summary
    * wep_db

emulate
    Emulate TravisCi
    Start TravisCi emulator processing current .travis.yml file. This is the default action.

force-lint
    Start TravisCi emulator processing current .travis.yml file and setting LINT_CHECK variabile to value "1" and TESTS to value "0". In this way the build of linting is always executed.

force-test
    Start TravisCi emulator processing current .travis.yml file, setting TESTS to value "1" and LINT_CHECK variabile to value "0". In this way the build of test is always executed.

lint
    Start TravisCi emulator processing current .travis.yml file and execute just build with LINT_CHECK="1". In this way only the build of linting is executed.

show-color
    Show colored message meaning

show-log
    Show last log

summary
    Show last log summary

test
    Start TravisCi emulator processing current .travis.yml file and execute just build with TESTS="1". In this way only the build of test is executed.

web-db
    Remove virtual environments and postgres database created by previous travis emulator interupted

TRAVIS PHASES
Travis phase are:
    +-----------------------------------------------------------------+--------------------+----+---+
    | Description | name |loc.|web|
    +-----------------------------------------------------------------+--------------------+----+---+
    | Initialize from .travis.conf | travis.conf | ✔ | ✗ |
    +-----------------------------------------------------------------+--------------------+----+---+
    | Matrix initialization (python version too) | matrix | ✔ | ✔ |
    +-----------------------------------------------------------------+--------------------+----+---+
    | Build job | build | ✔ | ✔ |
    +-----------------------------------------------------------------+--------------------+----+---+
    | Optional install packages `apt addons` | addons.apt.package |(1) | ✔ |
    +-----------------------------------------------------------------+--------------------+----+---+
    | Optional install packages `cache` | | ✔ | ✔ |
    +-----------------------------------------------------------------+--------------------+----+---+
    | Set global values `env global` | env.global | ✔ | ✔ |
    +-----------------------------------------------------------------+--------------------+----+---+
    | Execute code `before_install` | before_install | ✔ | ✔ |
    +-----------------------------------------------------------------+--------------------+----+---+
    | Execute build code `install` | | ✔ | ✔ |
    +-----------------------------------------------------------------+--------------------+----+---+
    | Execute build code `before_script` | | ✔ | ✔ |
    +-----------------------------------------------------------------+--------------------+----+---+
    | Execute build code `script` | | ✔ | ✔ |
    +-----------------------------------------------------------------+--------------------+----+---+
    | Execute build `before_cache` (only if cache is effective) | | ✗ | ✔ |
    +-----------------------------------------------------------------+--------------------+----+---+
    | Execute build code `after_success` | | ✔ | ✔ |
    +-----------------------------------------------------------------+--------------------+----+---+
    | Or execute `after_failure` | | ✗ | ✔ |
    +-----------------------------------------------------------------+--------------------+----+---+
    | Optional code `before_deploy` (only if deployment is effective) | | ✗ | ✔ |
    +-----------------------------------------------------------------+--------------------+----+---+
    | Optional code `deploy` | | ✗ | ✔ |
    +-----------------------------------------------------------------+--------------------+----+---+
    | Optional code `after_deploy` (only if deployment is effective) | | ✗ | ✔ |
    +-----------------------------------------------------------------+--------------------+----+---+
    | Execute code `after_script` | | ✗ | ✔ |
    +-----------------------------------------------------------------+--------------------+----+---+
    (1) Emulator checks for installed package, it cannot install

OPTIONS

-A --trace-after regex
    set trace after executed yaml statement; regex is regular expression to match one or more lines of .travis.yml file. If regex starts with :: (double colon) means a trace before specific phase (see TRAVIS PHASES).

-B --debug
    debug mode: do not create log and execution can accept input from keyboard. This option is automatically enabled by -A --trace-after -T --trace switches

-C--no-cache
    do not use stored PYPI

-c--conf file
    configuration file (def .travis.conf)

-D--debug-level number
    travis_debug_mode: may be 0,1,2,3,8 or 9 (def yaml dependents)

-E--no-savenv
    do not save virtual environment into ~/VME/... if does not exist

-F--full
    run final travis with full features

-f--force
    force to remove recent log (wep-db)

-k--keep
    keep DB and virtual environment after tests

-L--lint-level number
    lint_check_level: may be minimal,reduced,average,nearby,oca; def value from .travis.yml

-l--logdir dir
    log directory (def=/home/odoo/travis_log)

-m--missing
    show missing line in report coverage

-n--dry-run
    do nothing (dry-run)

-O--orggit-org
    git organization, i.e. oca or zeroincombenze

-q--quiet
    silent mode

-S--syspkg false|true
    use python system packages (def yaml dependents)

-T--trace regex
    set trace before executing yaml statement; regex is regular expression to match one or more lines of .travis.yml file. If regex starts with :: (double colon) means a trace before specific phase (see TRAVIS PHASES).

-v--verbose
    verbose mode

-X--translation 0|1
    enable translation test (def yaml dependents)

-Y--yaml-file file
    file yaml to process (def .travis.yml)

-y--pyver pyver
    test with specific python versions (comma separated)

-Z--zero
    use local zero-tools

EXAMPLES
travis

BUGS
No known bugs.

AUTHOR
Antonio Maria Vigliotti (antoniomaria.vigliotti@gmail.com)