Skip to content

add a limit to the download loop #34

add a limit to the download loop

add a limit to the download loop #34

Workflow file for this run

name: Test installation
on: [push]
jobs:
test_install:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: pip install .[cli,dev]
- name: Test installation with pytest
run: |
attempt=0
until rembg d || [ $attempt -eq 5 ]; do
attempt=$((attempt+1))
echo "Attempt $attempt to download the models..."
done
if [ $attempt -eq 5 ]; then
echo "downloading the models failed 5 times, exiting..."
exit 1
fi
pytest