Commit aee025ea by Mathieu Kniewallner Committed by Bjorn Neergaard

ci: define `timeout` on macOS

Co-authored-by: Bjorn Neergaard <bjorn@neersighted.com>
parent 31ef8d78
...@@ -81,7 +81,12 @@ jobs: ...@@ -81,7 +81,12 @@ jobs:
- name: Ensure cache is healthy - name: Ensure cache is healthy
if: steps.cache.outputs.cache-hit == 'true' if: steps.cache.outputs.cache-hit == 'true'
run: timeout 10s poetry run pip --version || rm -rf .venv run: |
# `timeout` is not available on macOS, so we define a custom function.
[ "$(command -v timeout)" ] || function timeout() { perl -e 'alarm shift; exec @ARGV' "$@"; }
# Using `timeout` is a safeguard against the Poetry command hanging for some reason.
timeout 10s poetry run pip --version || rm -rf .venv
# XXX: https://github.com/pypa/pip/issues/11352 causes random failures -- remove once fixed in a release. # XXX: https://github.com/pypa/pip/issues/11352 causes random failures -- remove once fixed in a release.
- name: Upgrade pip on 3.11 for macOS - name: Upgrade pip on 3.11 for macOS
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment