diff --git a/.github/workflows/test_and_deploy.yml b/.github/workflows/test_and_deploy.yml index 3561aaf..c612f56 100644 --- a/.github/workflows/test_and_deploy.yml +++ b/.github/workflows/test_and_deploy.yml @@ -28,7 +28,7 @@ jobs: strategy: matrix: platform: [ubuntu-latest, windows-latest, macos-latest] - python-version: [3.9, "3.10"] + python-version: ["3.10"] steps: - uses: actions/checkout@v4 @@ -38,10 +38,10 @@ jobs: with: python-version: ${{ matrix.python-version }} - # these libraries enable testing on Qt on linux + # These libraries enable testing on Qt on linux - uses: tlambert03/setup-qt-libs@v1 - # strategy borrowed from vispy for installing opengl libs on windows + # Strategy borrowed from vispy for installing opengl libs on Windows - name: Install Windows OpenGL if: runner.os == 'Windows' run: | @@ -49,20 +49,64 @@ jobs: powershell gl-ci-helpers/appveyor/install_opengl.ps1 if (Test-Path -Path "C:\Windows\system32\opengl32.dll" -PathType Leaf) {Exit 0} else {Exit 1} - # note: if you need dependencies from conda, considering using - # setup-miniconda: https://github.com/conda-incubator/setup-miniconda - # and - # tox-conda: https://github.com/tox-dev/tox-conda - - name: Install dependencies + # Set up Miniconda + - name: Set up Miniconda + uses: conda-incubator/setup-miniconda@v3 + with: + miniconda-version: "latest" + auto-update-conda: true + python-version: ${{ matrix.python-version }} + + # Initialize Conda on Linux/macOS + - name: Initialize Conda (Linux/macOS) + if: runner.os != 'Windows' + shell: bash -l {0} + run: | + conda init bash + + - name: Create and activate environment (Linux/macOS) + if: runner.os != 'Windows' + shell: bash -l {0} run: | + conda create --name test-env python=${{ matrix.python-version }} -y + source activate test-env + conda install -c conda-forge pytables==3.8.0 -y python -m pip install --upgrade pip python -m pip install setuptools tox tox-gh-actions - # this runs the platform-specific tests declared in tox.ini - - name: Test with tox - uses: aganders3/headless-gui@v2 - with: - run: python -m tox + # Initialize Conda on Windows + - name: Initialize Conda (Windows) + if: runner.os == 'Windows' + shell: powershell + run: | + C:\Miniconda\Scripts\conda.exe init powershell + + - name: Create and activate environment (Windows) + if: runner.os == 'Windows' + shell: powershell + run: | + C:\Miniconda\Scripts\conda.exe create --name test-env python=${{ matrix.python-version }} -y + conda activate test-env + C:\Miniconda\Scripts\conda.exe install -c conda-forge pytables==3.8.0 -y + python -m pip install --upgrade pip + python -m pip install setuptools tox tox-gh-actions + + # This runs the platform-specific tests declared in tox.ini + - name: Test with tox (Linux/macOS) + if: runner.os != 'Windows' + shell: bash -l {0} + run: | + source activate test-env + python -m tox + env: + PLATFORM: ${{ matrix.platform }} + + - name: Test with tox (Windows) + if: runner.os == 'Windows' + shell: powershell + run: | + conda activate test-env + python -m tox env: PLATFORM: ${{ matrix.platform }} @@ -70,7 +114,7 @@ jobs: uses: codecov/codecov-action@v4 deploy: - # this will run when you have tagged a commit, starting with "v*" + # This will run when you have tagged a commit, starting with "v*" # and requires that you have put your twine API key in your # github secrets (see readme for details) needs: [test] diff --git a/setup.cfg b/setup.cfg index a5e4849..7f8506f 100644 --- a/setup.cfg +++ b/setup.cfg @@ -16,7 +16,6 @@ classifiers = Operating System :: OS Independent Programming Language :: Python :: 3 Programming Language :: Python :: 3 :: Only - Programming Language :: Python :: 3.9 Programming Language :: Python :: 3.10 Topic :: Scientific/Engineering :: Artificial Intelligence Topic :: Scientific/Engineering :: Image Processing @@ -41,8 +40,7 @@ install_requires = qtpy>=2.4 scikit-image scipy - tables -python_requires = >=3.9 +python_requires = >=3.10 include_package_data = True package_dir = =src diff --git a/tox.ini b/tox.ini index c715870..e9fa69b 100644 --- a/tox.ini +++ b/tox.ini @@ -1,11 +1,10 @@ # For more information about tox, see https://tox.readthedocs.io/en/latest/ [tox] -envlist = py{39,310}-{linux,macos,windows} +envlist = py{310}-{linux,macos,windows} isolated_build=true [gh-actions] python = - 3.9: py39 3.10: py310 [gh-actions:env]