Giter VIP home page Giter VIP logo

travis-wait-enhanced's Introduction

GitHub release Total downloads Build Status Go Report Code Quality
Become a sponsor Donate Paypal

⚠️ Abandoned project

This project is not maintained anymore and is abandoned. Feel free to fork and make your own changes if needed.

Thanks to everyone for their valuable feedback and contributions.

About

travis-wait-enhanced ⏰ is a CLI application written in Go to replace the existing travis_wait bash function (with some enhancements) to prevent Travis CI from thinking a long-running process has stalled.

Features

  • Custom timeout duration
  • Custom interval duration at which to print keep-alive messages
  • Custom formatting options
  • Print command output to stdout/stderr

Download

travis-wait-enhanced binaries are available in releases page.

Choose the archive matching the destination platform and extract travis-wait-enhanced:

$ cd /opt
$ wget -qO- https://github.com/crazy-max/travis-wait-enhanced/releases/download/v1.2.0/travis-wait-enhanced_1.2.0_linux_x86_64.tar.gz | tar -zxvf - travis-wait-enhanced

After getting the binary, it can be tested with ./travis-wait-enhanced --help or moved to a permanent location.

$ ./travis-wait-enhanced --help
Usage: travis-wait-enhanced <command> ...

Prevent Travis CI from thinking a long-running process has stalled. More info:
https://github.com/crazy-max/travis-wait-enhanced

Arguments:
  <command> ...    Command to execute.

Flags:
  --help               Show context-sensitive help.
  --version
  --timeout=20m        Timeout for this command.
  --interval=1m        Interval at which to print keep-alive messages.
  --print-name         Print the name of this tool to identify keep-alive messages.
  --print-string="Still running..."
                       Keep-alive message printed in each interval.
  --print-timestamp    Print the current timestamp after each keep-alive message.
  --print-newline      Print a newline character after each keep-alive message.

Usage

travis-wait-enhanced [<flags>] <command>

If your command contains flags (e.g. mvn -V install -Pmy-profile) then use -- to indicate the end of the travis-wait-enhanced flags to avoid parsing errors. For example

travis-wait-enhanced --interval=1m --timeout=20m -- mvn -V clean install -Prun-its

To use travis-wait-enhanced in your .travis.yml add :

before_install:
  # linux
  - |
    wget -qO- "https://github.com/crazy-max/travis-wait-enhanced/releases/download/v1.2.0/travis-wait-enhanced_1.2.0_linux_x86_64.tar.gz" | tar -zxvf - travis-wait-enhanced
    mv travis-wait-enhanced /home/travis/bin/
    travis-wait-enhanced --version
  # windows
  - |
    curl -LfsS -o /tmp/travis-wait-enhanced.zip "https://github.com/crazy-max/travis-wait-enhanced/releases/download/v1.2.0/travis-wait-enhanced_1.2.0_windows_x86_64.zip"
    7z x /tmp/travis-wait-enhanced.zip -y -o/usr/bin/ travis-wait-enhanced.exe -r
    travis-wait-enhanced --version

How can I help?

All kinds of contributions are welcome 🙌! The most basic way to show your support is to star 🌟 the project, or to raise issues 💬 You can also support this project by becoming a sponsor on GitHub 👏 or by making a Paypal donation to ensure this journey continues indefinitely! 🚀

Thanks again for your support, it is much appreciated! 🙏

License

MIT. See LICENSE for more details.

travis-wait-enhanced's People

Contributors

crazy-max avatar dependabot-preview[bot] avatar dependabot[bot] avatar github-actions[bot] avatar rnc avatar zajozorpho avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

rnc zajozorpho

travis-wait-enhanced's Issues

Support for arbitrary commands with argumments

Behaviour

Using version 0.2.0

Steps to reproduce this issue

  1. Run:
./travis-wait-enhanced --interval=1m --timeout=20m mvn compile '-Prun-its'
travis-wait-enhanced: error: unknown short flag '-P', try --help

Expected behaviour

Tell me what should happen

Possibly after the command line argument, all remaining arguments should be consumed and passed on to the command.

Actual behaviour

Tell me what happens instead

Configuration

  • travis-wait-enhanced version :
  • Platform (windows/linux) :

Configurable keep-alive message

We are using travis-wait-enhanced along with python's pytest suite.
Some of our tests take so long, that they would time out without the keep-alive message.

This tool comes in handy, but the keep-alive messages kind of break the pytest output like this:

tests/test_xxx.py .                                  [  5%]
tests/test_yyy.py travis-wait-enhanced INF Still running at Wed, 16 Oct 2019 17:07:05 UTC...
.....                       [ 17%]
tests/test_zzz.py .FFF                                               [ 19%]
tests/test_aaa.py travis-wait-enhanced INF Still running at Wed, 16 Oct 2019 17:17:00 UTC...
travis-wait-enhanced INF Still running at Wed, 16 Oct 2019 17:26:55 UTC...
......F...                   [ 31%]
tests/bbb.py .....                                                 [ 33%]
tests/ccc.py ..EFE.      

For this case I would love to have a command line argument, which can change the keep-alive message, and another which removes the newline.
eg. --keep-alive-message='*' --no-keep-alive-newline

I can fork and try to create a PR if you are willing to merge.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.