11---
22version : 2.1
33
4- orbs :
5- coverage-reporter : codacy/coverage-reporter@13.13.0
6-
74commands :
8-
95 check_changes :
106 steps :
117 - run :
@@ -41,6 +37,7 @@ commands:
4137 command : |
4238 . /opt/conda/etc/profile.d/conda.sh
4339 conda activate esmvaltool
40+ pip check
4441 pytest -n 4 --junitxml=test-reports/report.xml
4542 esmvaltool version
4643 esmvaltool -- --help
@@ -75,7 +72,7 @@ commands:
7572 - run :
7673 name : Install git+ssh
7774 environment :
78- DEBIAN_FRONTEND : noninteractive # needed to install tzdata
75+ DEBIAN_FRONTEND : noninteractive # needed to install tzdata
7976 command : apt update && apt install -y git ssh
8077 - checkout
8178 - check_changes
@@ -95,7 +92,7 @@ commands:
9592 conda env create -n esmvaltool -f environment.yml --verbose
9693 conda activate esmvaltool
9794 mamba list >> /logs/conda.txt
98- pip install << parameters.flags >> ".[<<parameters.extra>>]"> /logs/install.txt 2>&1
95+ pip install --no-deps << parameters.flags >> ".[<<parameters.extra>>]"> /logs/install.txt 2>&1
9996 if [[ "<<parameters.flags>>" != *'--editable'* ]]
10097 then
10198 rm -r esmvaltool
@@ -135,7 +132,7 @@ jobs:
135132 . /opt/conda/etc/profile.d/conda.sh
136133 conda activate esmvaltool
137134 mkdir /logs
138- pip install .[test] > /logs/install.txt 2>&1
135+ pip install --no-deps .[test] > /logs/install.txt 2>&1
139136 - run :
140137 name : Check Python code style and mistakes
141138 command : |
@@ -146,15 +143,15 @@ jobs:
146143 name : Remove source code to test the installed software
147144 command : rm -r esmvaltool
148145 - test_and_report
146+ - run :
147+ # Documentation available at https://docs.codacy.com/coverage-reporter/
148+ name : Upload coverage report to Codacy
149+ command : bash <(curl -Ls https://coverage.codacy.com/get.sh) report -s -r test-reports/coverage.xml
149150 - save_cache :
150151 key : test-{{ .Branch }}-{{ checksum "cache_key.txt" }}
151152 paths :
152153 - /root/.cache/pip
153154 - .pytest_cache
154- - coverage-reporter/send_report :
155- coverage-reports : ' test-reports/coverage.xml'
156- project-token : $CODACY_PROJECT_TOKEN
157- skip : true # skip if project-token is not defined (i.e. on a fork)
158155
159156 test_installation_from_source_test_mode :
160157 # Test installation from source
@@ -186,7 +183,7 @@ jobs:
186183 - run :
187184 name : Install git and ssh
188185 environment :
189- DEBIAN_FRONTEND : noninteractive # needed to install tzdata
186+ DEBIAN_FRONTEND : noninteractive # needed to install tzdata
190187 command : apt update && apt install -y git ssh
191188 - checkout
192189 - run :
@@ -205,23 +202,29 @@ jobs:
205202 mkdir /logs
206203 conda env create -n esmvaltool -f environment.yml --verbose
207204 conda activate esmvaltool
205+ # Temporarily install intake-esgf here until there is a new release
206+ # that includes https://github.com/esgf2-us/intake-esgf/pull/160.
207+ pip install git+https://github.com/esgf2-us/intake-esgf@main
208208 mamba list >> /logs/conda.txt
209- pip install --editable .[develop]
209+ pip install --no-deps -- editable .[develop]
210210 git clone https://github.com/ESMValGroup/ESMValCore $HOME/ESMValCore
211- pip install --editable $HOME/ESMValCore[develop]
211+ pip install --no-deps -- editable $HOME/ESMValCore[develop]
212212 - log_versions
213213 - test_and_report
214214 - run :
215215 name : Run recipes
216216 command : |
217217 . /opt/conda/etc/profile.d/conda.sh
218218 conda activate esmvaltool
219- mkdir -p ~/climate_data
220- esmvaltool config get_config_user
221- echo "search_esgf: when_missing" >> ~/.config/esmvaltool/config-user.yml
222- cat ~/.config/esmvaltool/config-user.yml
219+ esmvaltool config copy data-intake-esgf.yml
220+ python -c '
221+ import intake_esgf
222+ intake_esgf.conf["solr_indices"]["esgf.ceda.ac.uk"] = True
223+ intake_esgf.conf["solr_indices"]["esgf-data.dkrz.de"] = True
224+ intake_esgf.conf.save()
225+ '
223226 for recipe in esmvaltool/recipes/testing/recipe_*.yml; do
224- esmvaltool run "$recipe"
227+ esmvaltool run --max-parallel-tasks=2 "$recipe"
225228 done
226229 - store_artifacts :
227230 path : /root/esmvaltool_output
@@ -236,7 +239,7 @@ jobs:
236239 # Test building documentation
237240 docker :
238241 - image : condaforge/miniforge3:latest
239- resource_class : medium
242+ resource_class : medium+
240243 steps :
241244 - checkout
242245 - run :
@@ -246,7 +249,8 @@ jobs:
246249 # Install
247250 conda env create -n esmvaltool -f environment_python.yml
248251 conda activate esmvaltool
249- pip install .[doc]
252+ pip install --no-deps .[doc]
253+ pip check
250254 # Log versions
251255 dpkg -l > /logs/versions.txt
252256 conda env export > /logs/environment.yml
@@ -269,7 +273,7 @@ jobs:
269273 # Install prerequisites
270274 mkdir /logs
271275 # Install ESMValTool in a new conda environment
272- mamba create -y --name esmvaltool -c conda-forge esmvaltool 'python=3.11 ' >> /logs/conda.txt 2>&1
276+ mamba create -y --name esmvaltool -c conda-forge esmvaltool 'python=3.12 ' >> /logs/conda.txt 2>&1
273277 # Activate the environment
274278 set +x; conda activate esmvaltool; set -x
275279 # Log versions
0 commit comments