1717 PYTHON_VERSION : " 3.11"
1818
1919jobs :
20- setup :
21- name : Setup tests
20+ test :
21+ name : Run tests
2222 runs-on : ubuntu-latest
2323 permissions :
2424 contents : write
3737 testing/extractions
3838 testing/protocol
3939 testing/share
40- key : testing-${{ runner.os }}-${{ env.PYTHON_VERSION }}-${{ hashFiles('**/* .py') }}
40+ key : testing-${{ runner.os }}-${{ env.PYTHON_VERSION }}-${{ hashFiles('isimip_utils/tests/constants .py') }}
4141 restore-keys : |
4242 testing-${{ runner.os }}-${{ env.PYTHON_VERSION }}-
4343
5050 uses : actions/setup-python@v6
5151 with :
5252 python-version : ${{ env.PYTHON_VERSION }}
53+ cache : ' pip'
5354
5455 - name : Install package 📦
55- run : pip install -e .[all]
56+ run : |
57+ pip install --upgrade pip
58+ pip install -e .[all]
5659
5760 - name : Run setup scripts 🔧
5861 run : |
@@ -68,45 +71,19 @@ jobs:
6871 testing/extractions
6972 testing/protocol
7073 testing/share
71- key : testing-${{ runner.os }}-${{ env.PYTHON_VERSION }}-${{ hashFiles('**/*.py') }}
72-
73- test :
74- name : Run tests
75- needs : setup
76- runs-on : ubuntu-latest
77- permissions :
78- contents : write
74+ key : testing-${{ runner.os }}-${{ env.PYTHON_VERSION }}-${{ hashFiles('isimip_utils/tests/constants.py') }}
7975
80- steps :
81- - name : Check out repository 💾
82- uses : actions/checkout@v5
83- with :
84- persist-credentials : false
76+ - name : Run pytest 🧪
77+ run : pytest --cov=isimip_utils --cov-fail-under=90 --cov-report=term-missing
8578
86- - name : Restore testing cache 📥
87- uses : actions/cache@v4
79+ - name : Upload testing directory 📤
80+ uses : actions/upload-artifact@v5
8881 with :
82+ name : testing
8983 path : |
9084 testing/datasets
9185 testing/extractions
86+ testing/output
87+ testing/plots
9288 testing/protocol
9389 testing/share
94- key : testing-${{ runner.os }}-${{ env.PYTHON_VERSION }}-${{ hashFiles('**/*.py') }}
95- restore-keys : |
96- testing-${{ runner.os }}-${{ env.PYTHON_VERSION }}-
97-
98- - name : Install cdo 🌍
99- run : |
100- sudo apt-get update
101- sudo apt-get install -y cdo netcdf-bin --no-install-recommends
102-
103- - name : Set up Python 🐍
104- uses : actions/setup-python@v6
105- with :
106- python-version : ${{ env.PYTHON_VERSION }}
107-
108- - name : Install package 📦
109- run : pip install -e .[all]
110-
111- - name : Run pytest 🧪
112- run : pytest --cov=isimip_utils --cov-fail-under=90 --cov-report=term-missing
0 commit comments