diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7544f6d..d2d8841 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -41,9 +41,42 @@ jobs: - name: Pip install run: pip install . + - name: Run tests - run: pip install pytest && pytest tests -v + run: | + pip install pytest pytest-cov + pytest tests -s -v --cov --cov-report xml:coverage-report/coverage.xml + + - name: Upload coverage report artifact to be used by Codecov + # only upload if matrix.os is ubuntu-latest and matrix.python-version is 3.12 + if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.12' + uses: actions/upload-artifact@v2 + with: + name: coverage-report + path: coverage-report + + codecov: + needs: tests + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Download coverage report artifact + uses: actions/download-artifact@v2 + with: + name: coverage-report + path: coverage-report + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v3 + with: + token: ${{ secrets.CODECOV_TOKEN }} + files: ./coverage-report/coverage.xml + fail_ci_if_error: true + verbose: true + name: codecov-umbrella + cd: permissions: contents: write diff --git a/pyproject.toml b/pyproject.toml index af03df1..6d6854c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -37,7 +37,6 @@ betapipeline = "imgtools.autopipeline_refactored:main" pytest = "^8.2.0" ruff = "^0.4.4" pytest-cov = ">=4.0.0" -pytest-xdist = ">=3.5.0" [tool.poetry.extras] torch = ["torch", "torchio"] diff --git a/setup.py b/setup.py index 13bd1cb..be7d187 100644 --- a/setup.py +++ b/setup.py @@ -8,7 +8,7 @@ setup( name="med-imagetools", - version="1.2.0.2", + version="1.3.0.1", author="Sejin Kim, Michal Kazmierski, Kevin Qu, Vishwesh Ramanathan, Benjamin Haibe-Kains", author_email="benjamin.haibe.kains@utoronto.ca", description="Transparent and reproducible image processing pipelines in Python.", @@ -28,5 +28,5 @@ "License :: OSI Approved :: Apache Software License", "Development Status :: 2 - Pre-Alpha" ], - python_requires='>=3.6', + python_requires='>=3.7', )