Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Tests

on:
push:
branches:
- master
- main
pull_request:
branches:
- master
- main

jobs:
unit-tests:
name: pytest (Python ${{ matrix.python-version }})
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13"]

defaults:
run:
shell: bash -el {0}

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up micromamba
uses: mamba-org/setup-micromamba@v1
with:
environment-file: continuous_integration/environment-ci.yml
environment-name: cmac_test_env
create-args: >-
python=${{ matrix.python-version }}
cache-environment: true

- name: Install cmac
run: pip install --no-deps -e .

- name: Run unit tests
run: pytest -v cmac/tests/
2 changes: 1 addition & 1 deletion cmac/tests/test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ def test_get_cmac_values():
cmac_config = get_cmac_values('xsapr_i5_ppi')
assert type(cmac_config) == dict

assert cmac_config['save_name'] == 'sgpxsaprcmacsurI5.c1'
assert cmac_config['save_name'] == 'sgpxsaprcmacsecI5.c1'
assert cmac_config['site_alt'] == 328
assert cmac_config['ref_offset'] == 0.0
assert cmac_config['self_const'] == 60000.00
Expand Down
20 changes: 20 additions & 0 deletions continuous_integration/environment-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: cmac_test_env
channels:
- conda-forge
- defaults
dependencies:
- arm_pyart
- cartopy
- cmweather
- coincbc
- cython
- dask
- distributed
- matplotlib
- numpy
- pytest
- scikit-fuzzy
- wradlib
- pip
- pip:
- git+https://github.com/CSU-Radarmet/CSU_RadarTools.git
Loading