| 1 |
name: CI |
| 2 |
|
| 3 |
on: [push, pull_request] |
| 4 |
|
| 5 |
jobs: |
| 6 |
test: |
| 7 |
runs-on: ${{ matrix.os }} |
| 8 |
continue-on-error: ${{ matrix.experimental }} |
| 9 |
strategy: |
| 10 |
fail-fast: false |
| 11 |
matrix: |
| 12 |
os: ["windows-latest", "ubuntu-latest", "macos-latest"] |
| 13 |
python-version: ["3.11", "3.12", "3.13"] |
| 14 |
experimental: [false] |
| 15 |
include: |
| 16 |
- python-version: "3.13" |
| 17 |
os: "ubuntu-latest" |
| 18 |
experimental: true |
| 19 |
|
| 20 |
env: |
| 21 |
PYTHON_VERSION: ${{ matrix.python-version }} |
| 22 |
OS: ${{ matrix.os }} |
| 23 |
UNSTABLE: ${{ matrix.experimental }} |
| 24 |
ACTIONS_ALLOW_UNSECURE_COMMANDS: true |
| 25 |
|
| 26 |
steps: |
| 27 |
- name: Checkout source |
| 28 |
uses: actions/checkout@v6 |
| 29 |
|
| 30 |
- name: Setup Conda Environment |
| 31 |
uses: conda-incubator/setup-miniconda@v3 |
| 32 |
with: |
| 33 |
miniforge-version: latest |
| 34 |
python-version: "${{ matrix.python-version }}" |
| 35 |
activate-environment: test-environment |
| 36 |
environment-file: continuous_integration/environment.yaml |
| 37 |
channels: conda-forge |
| 38 |
conda-remove-defaults: true |
| 39 |
channel-priority: strict |
| 40 |
|
| 41 |
- name: Install unstable dependencies |
| 42 |
if: matrix.experimental == true |
| 43 |
shell: bash -l {0} |
| 44 |
run: | |
| 45 |
python -m pip install versioneer pkgconfig setuptools-scm; \ |
| 46 |
conda uninstall --force-remove -y scipy h5py pyresample pykdtree pandas xarray; \ |
| 47 |
python -m pip install \ |
| 48 |
-f https://pypi.anaconda.org/scientific-python-nightly-wheels/simple/ \ |
| 49 |
--trusted-host pypi.anaconda.org \ |
| 50 |
--no-deps --pre --upgrade \ |
| 51 |
matplotlib \ |
| 52 |
numpy \ |
| 53 |
pandas \ |
| 54 |
scipy; \ |
| 55 |
python -m pip install \ |
| 56 |
--no-deps --upgrade --pre --no-build-isolation \ |
| 57 |
git+https://github.com/dask/dask \ |
| 58 |
git+https://github.com/dask/distributed \ |
| 59 |
git+https://github.com/h5py/h5py \ |
| 60 |
git+https://github.com/storpipfugl/pykdtree \ |
| 61 |
git+https://github.com/pytroll/pyresample \ |
| 62 |
git+https://github.com/pydata/bottleneck \ |
| 63 |
git+https://github.com/pydata/xarray; |
| 64 |
|
| 65 |
- name: Install geotiepoints |
| 66 |
shell: bash -l {0} |
| 67 |
run: | |
| 68 |
pip install -e . |
| 69 |
python setup.py build_ext --inplace --cython-coverage --force |
| 70 |
|
| 71 |
- name: Run unit tests |
| 72 |
shell: bash -l {0} |
| 73 |
run: | |
| 74 |
pytest --cov=geotiepoints geotiepoints/tests --cov-report=xml --cov-report= |
| 75 |
|
| 76 |
- name: Upload unittest coverage to Codecov |
| 77 |
uses: codecov/codecov-action@v5 |
| 78 |
with: |
| 79 |
flags: unittests |
| 80 |
files: ./coverage.xml |
| 81 |
env_vars: OS,PYTHON_VERSION,UNSTABLE |
| 82 |
|
| 83 |
- name: Coveralls Parallel |
| 84 |
uses: AndreMiras/coveralls-python-action@develop |
| 85 |
with: |
| 86 |
flag-name: run-${{ matrix.test_number }} |
| 87 |
parallel: true |
| 88 |
if: runner.os == 'Linux' |
| 89 |
|
| 90 |
coveralls: |
| 91 |
needs: [test] |
| 92 |
runs-on: ubuntu-latest |
| 93 |
steps: |
| 94 |
- name: Coveralls Finished |
| 95 |
uses: AndreMiras/coveralls-python-action@develop |
| 96 |
with: |
| 97 |
parallel-finished: true |