dist: bionic

language:
  - generic

before_install:
  - docker-compose build
  - docker images
  - docker-compose -f docker-compose.yml -f docker-compose.debug.yml up -d
  - docker-compose ps

script:
  - curl --connect-timeout 10 http://localhost:8002
  - docker-compose logs --no-color
  - docker logs chtsh
  - CHEATSH_TEST_STANDALONE=NO bash tests/run-tests.sh

dist: bionic

language:
  - generic

before_install:
  - docker-compose build
  - docker images
  - docker-compose -f docker-compose.yml -f docker-compose.debug.yml up -d
  - docker-compose ps

script:
  - curl --retry 3 --retry-all http://localhost:8002
  - docker-compose logs --no-color
  - docker logs chtsh
  - CHEATSH_TEST_STANDALONE=NO bash tests/run-tests.sh

Use `curl` retry flags for waiting for service
Use `curl` retry flags for waiting for service

`--connect-timeout` didn't work, because Docker allows it, but breaks,
because nothing is listening on the other side, giving this error.

    $ curl --connect-timeout 10 http://localhost:8002
    curl: (56) Recv failure: Connection reset by peer
    The command "curl --connect-timeout 10 http://localhost:8002" exited with 56.

https://travis-ci.org/github/chubin/cheat.sh/builds/741348053#L401

`--retry-all` makes `curl` retry on all errors, including connection resets.