githubcontinuous-integrationgithub-actionsstryker

GitHub workflow job timeout-minutes is ignored. Why?


According to https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idtimeout-minutes

The timeout-minutes parameter defaults to 360 minutes (6 hours).

I parallelized my mutation testing so that my workflow takes around 6.5 hours to run (mutation testing with Stryker of ~1600 mutants on just 2 cores - 9 jobs in parallel). Thus, I’ve set the timeout-minutes to 420 minutes (7 hours) for the mutation job just in case: https://github.com/lbragile/TabMerger/blob/b53a668678b7dcde0dd8f8b06ae23ee668ff8f9e/.github/workflows/testing.yml#L53

This seems to be ignored as the workflow still ends in 6 hours 23min (without warnings/errors): https://github.com/lbragile/TabMerger/runs/2035483167?check_suite_focus=true

Why is my value being ignored?

Also, is there anything I can do to use more CPUs on the workflows virtual machine?


Solution

  • GitHub-hosted runners are limited to maximum 6 hours per job.

    Usage limits

    There are some limits on GitHub Actions usage when using GitHub-hosted runners. These limits are subject to change.

    [...]

    • Job execution time - Each job in a workflow can run for up to 6 hours of execution time. If a job reaches this limit, the job is terminated and fails to complete.

    https://docs.github.com/en/actions/reference/usage-limits-billing-and-administration#usage-limits