Skip to content

armgit / rembg

Public Imported from GitHub
0

Rembg is a tool to remove images background

fix workflow

Daniel Gatis2fa0e683ffec
diff --git a/.github/workflows/publish_pypi.yml b/.github/workflows/publish_pypi.yml
index 648ff06..3da1162 100644
--- a/.github/workflows/publish_pypi.yml
+++ b/.github/workflows/publish_pypi.yml
@@ -28,3 +28,33 @@ jobs:
poetry publish
env:
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PIPY_PASSWORD }}
+
+ test_install:
+ needs: publish_pypi
+ runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ python-version: ["3.13"]
+
+ steps:
+ - uses: actions/checkout@v4
+ - name: Set up Python ${{ matrix.python-version }}
+ uses: actions/setup-python@v5
+ with:
+ python-version: ${{ matrix.python-version }}
+ - name: Wait for PyPI to update
+ run: sleep 60
+ - name: Install from PyPI
+ run: pip install rembg[cpu,cli]
+ - name: Test installation
+ 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
+ rembg --version
diff --git a/.github/workflows/test_install.yml b/.github/workflows/test_install.yml
deleted file mode 100644
index 5f18e35..0000000
--- a/.github/workflows/test_install.yml
+++ /dev/null
@@ -1,31 +0,0 @@
-name: Test installation
-
-on: [push]
-
-jobs:
- test_install:
- runs-on: ubuntu-latest
- strategy:
- matrix:
- python-version: ["3.13.9"]
-
- 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 .[cpu,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