Skip to content

Commit

Permalink
Add a ci timeout (#73)
Browse files Browse the repository at this point in the history
* Add .circleci/config.yml

* Updated config.yml

* Updated config.yml
  • Loading branch information
anakinxc authored Jan 12, 2023
1 parent cbc5bf7 commit 56451b1
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,14 @@ jobs:
# Add steps to the job
# See: https://circleci.com/docs/2.0/configuration-reference/#steps
steps:
# Kill the whole ci after 1hr
- run:
name: Cancel build after set time
background: true
command: |
sleep 3600
echo "Canceling workflow as too much time has elapsed"
curl -X POST --header "Content-Type: application/json" "https://circleci.com/api/v2/workflow/${CIRCLE_WORKFLOW_ID}/cancel?circle-token=${BUILD_TIMER_TOKEN}"
- checkout
- restore_cache:
name: "Restore pip cache"
Expand Down

0 comments on commit 56451b1

Please sign in to comment.