13

Im running some tests in circleci and some of the tests are taking longer then 10 min cause its ui tests that run on a headless browser that Im installing in my circle.yml

How can I extend the time of the timeout?

thanks

JohnBigs
  • 2,691
  • 3
  • 31
  • 61

3 Answers3

13

You can add the timeout modifier to your command to increase the timeout beyond the default 600 seconds (10min).

For example, if you ran a test called my-test.sh, you could do the following:

test:
  override:
    - ./my-test.sh:
        timeout: 900

Note that the command ends with a colon (:), with the modifier on the next line, double-indented (4 spaces instead of 2).

Reference: https://circleci.com/docs/configuration#modifiers

FelicianoTech
  • 3,894
  • 2
  • 13
  • 18
  • Note that the timeout command should be indented 4 spaces from the command above it, according to the specified documentation. This is referred to as a "double indentation" in the docs, which assumes you are using a two-space indentation. –  Oct 20 '16 at 05:03
  • Thanks @AaronMahan. – FelicianoTech Oct 24 '16 at 15:58
  • I haven't personally tried it. I'd assume that as long as the trailing colon and the right indentation is used, it'll work but I'm not sure. – FelicianoTech Nov 21 '17 at 00:26
10

If you're using Circle CI 2.0, the syntax is no_output_timeout:

- run:
    name: Running Tests
    command: ./my-test.sh
    no_output_timeout: 20m

More details: https://circleci.com/docs/2.0/configuration-reference/#run

Aaron Gray
  • 11,283
  • 7
  • 55
  • 61
6

You need to use the timeout modifier in your config as explained in this doc: https://circleci.com/docs/configuration#modifiers

Here is an example doubling the default 600s to 1200s:

commands:
    - /bin/bash build_scripts/deploy_to_eb.sh:
        timeout: 1200

Cheers

Joan
  • 4,079
  • 2
  • 28
  • 37