| 1 | name: TESTS-CONDA-ENV |
| 2 | |
| 3 | on: |
| 4 | pull_request: |
| 5 | push: |
| 6 | branches: [master] |
| 7 | |
| 8 | jobs: |
| 9 | run: |
| 10 | runs-on: ${{ matrix.os }} |
| 11 | continue-on-error: ${{ matrix.experimental }} |
| 12 | strategy: |
| 13 | fail-fast: false |
| 14 | matrix: |
| 15 | python-version: [ "3.10", "3.11", "3.12", "3.13", "3.14" ] |
| 16 | os: [windows-latest, ubuntu-latest, macos-latest] |
| 17 | platform: [x64, x32] |
| 18 | experimental: [false] |
| 19 | exclude: |
| 20 | - os: macos-latest |
| 21 | platform: x32 |
| 22 | include: |
| 23 | - python-version: "3.12" |
| 24 | os: "ubuntu-latest" |
| 25 | experimental: true |
| 26 | |
| 27 | steps: |
| 28 | - uses: actions/checkout@v5 |
| 29 | |
| 30 | - name: Setup micromamba Env |
| 31 | uses: mamba-org/setup-micromamba@v2 |
| 32 | with: |
| 33 | environment-name: TEST |
| 34 | create-args: >- |
| 35 | python=${{ matrix.python-version }} |
| 36 | numpy>1.13.3 |
| 37 | cython>=0.29.20 |
| 38 | pytest |
| 39 | coverage |
| 40 | - name: Install unstable dependencies |
| 41 | if: matrix.experimental == true |
| 42 | shell: bash -l {0} |
| 43 | run: | |
| 44 | python -m pip install \ |
| 45 | --index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple/ \ |
| 46 | --trusted-host pypi.anaconda.org \ |
| 47 | --no-deps --pre --upgrade \ |
| 48 | numpy; |
| 49 | python -m pip install -v -e . --no-deps --no-build-isolation --force-reinstall |
| 50 | |
| 51 | - name: Install cftime |
| 52 | if: matrix.experimental != true |
| 53 | shell: bash -l {0} |
| 54 | run: | |
| 55 | python -m pip install -v -e . --no-deps --force-reinstall |
| 56 | |
| 57 | - name: Run Tests |
| 58 | shell: bash -l {0} |
| 59 | run: | |
| 60 | coverage run -m pytest -vv test |
| 61 | coverage report |