diff --git a/.github/workflows/test_gdal_latest.yml b/.github/workflows/test_gdal_latest.yml index b742776f..86710e7f 100644 --- a/.github/workflows/test_gdal_latest.yml +++ b/.github/workflows/test_gdal_latest.yml @@ -21,13 +21,13 @@ jobs: test_gdal_latest: name: GDAL Latest runs-on: ubuntu-latest - container: osgeo/proj:9.1.0 + container: osgeo/proj:9.2.0 env: GDAL_DIR: ${{ github.workspace }}/gdal_install GDAL_DATA: ${{ github.workspace }}/gdal_install/share/gdal LD_LIBRARY_PATH: "${{ github.workspace }}/gdal_install/lib/:${LD_LIBRARY_PATH}" steps: - - uses: actions/checkout@v4.1.3 + - uses: actions/checkout@v4 - name: Update run: | apt-get update diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 1d7f8eea..2ad82e77 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -39,6 +39,8 @@ jobs: strategy: fail-fast: false matrix: + python-version: ['3.9', '3.10', '3.11', '3.12'] + gdal-version: ['3.9.3'] include: - python-version: '3.8' gdal-version: '3.4.3' @@ -49,10 +51,12 @@ jobs: - python-version: '3.11' gdal-version: '3.7.3' - python-version: '3.12' - gdal-version: '3.8.3' + gdal-version: '3.8.4' + - python-version: '3.12' + gdal-version: '3.9.3' steps: - - uses: actions/checkout@v4.1.3 + - uses: actions/checkout@v4 - name: Update run: | @@ -91,65 +95,66 @@ jobs: strategy: fail-fast: true matrix: + os: [macos-13, macos-14] + python-version: ['3.9', '3.10', '3.11', '3.12'] include: - - os: macos-13 - python-version: '3.12' - - os: macos-14 - python-version: '3.12' + - os: ubuntu-latest + python-version: '*' - os: windows-latest python-version: '3.12' steps: - uses: actions/checkout@v4 - - name: Conda Setup - uses: conda-incubator/setup-miniconda@v3 + - name: Setup Conda + uses: mamba-org/setup-micromamba@v1 with: - miniforge-variant: Mambaforge - miniforge-version: latest - use-mamba: true - auto-update-conda: true - use-only-tar-bz2: false - python-version: ${{ matrix.python-version }} - - - name: Install Env (OSX) - if: matrix.os == 'macos-13' || matrix.os == 'macos-14' + micromamba-version: '1.5.10-0' + init-shell: >- + bash + powershell + environment-name: test + create-args: >- + python=${{ matrix.python-version }} + libgdal=3.9 + geos>=3.12 + cython=3 + numpy + + - name: Install Env + if: matrix.os != 'windows-latest' shell: bash -l {0} run: | - conda config --prepend channels conda-forge - conda config --set channel_priority strict - conda create -n test python=${{ matrix.python-version }} libgdal geos=3.12 cython=3 - conda activate test - python -m pip install -e . || python -m pip install -e . - python -m pip install -r requirements-dev.txt + micromamba run -n test python -m pip install -e . --no-use-pep517 || micromamba run -n test python -m pip install -e . + micromamba run -n test python -m pip install -r requirements-dev.txt - name: Install Env (Windows) if: matrix.os == 'windows-latest' shell: bash -l {0} run: | - conda config --prepend channels conda-forge - conda config --set channel_priority strict - conda create -n test python=${{ matrix.python-version }} libgdal geos=3.12 cython=3 - conda activate test - GDAL_VERSION="3.7" python setup.py build_ext -I"/c/Users/runneradmin/miniconda3/envs/test/Library/include" -lgdal -L"/c/Users/runneradmin/miniconda3/envs/test/Library/lib" install - python -m pip install -r requirements-dev.txt + GDAL_VERSION="3.9.3" micromamba run -n test python setup.py build_ext -I"$MAMBA_ROOT_PREFIX/envs/test/Library/include" -lgdal -L"$MAMBA_ROOT_PREFIX/envs/test/Library/lib" install + micromamba run -n test python -m pip install -r requirements-dev.txt + rm -rf fiona - name: Check and Log Environment shell: bash -l {0} run: | - conda activate test - python -V - conda info + micromamba run -n test python -V + micromamba info + + - name: Test with Coverage (Ubuntu) + if: matrix.os == 'ubuntu-latest' + shell: bash -l {0} + run: | + micromamba run -n test python -m pytest -v -m "not wheel" -rxXs --cov fiona --cov-report term-missing - name: Test with Coverage (Windows) if: matrix.os == 'windows-latest' shell: bash -l {0} run: | - conda activate test - pytest -v -m "not wheel" -rxXs --cov fiona --cov-report term-missing + micromamba run -n test python -m pytest -v -m "not wheel" -rxXs --cov fiona --cov-report term-missing - name: Test with Coverage (OSX) - if: matrix.os == 'macos-13' + if: "${{matrix.os}} == 'macos-13' || ${{matrix.os}} == 'macos-14'" shell: bash -l {0} run: | - conda activate test - python -m pytest -v -m "not wheel" -rxXs --cov fiona --cov-report term-missing + micromamba run -n test python -m pytest -v -m "not wheel" -rxXs --cov fiona --cov-report term-missing diff --git a/pytest.ini b/pytest.ini index 522b93d8..373fc095 100644 --- a/pytest.ini +++ b/pytest.ini @@ -1,6 +1,7 @@ [pytest] filterwarnings = error + ignore:.*Plugin file tracers.* ignore:.*Sequential read of iterator was interrupted*:RuntimeWarning ignore:.*negative slices or start values other than zero may be slow*:RuntimeWarning ignore:.*negative step size may be slow*:RuntimeWarning