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