1414 - checkout
1515 - pixi/pixi_setup
1616 - run :
17- name : Check dependencies are compatible
18- command : pixi run --as-is pip check
17+ name : Check dependencies are compatible and installed
18+ command : |
19+ pixi run --as-is pip check
20+ # The following command should not install any new dependencies
21+ # because they are already in the conda environment, but this is
22+ # not checked.
23+ pixi run --as-is pip install --dry-run .[all]
1924 - run :
2025 name : Check code formatting and mistakes
2126 command : pixi run --as-is pre-commit run --all
@@ -49,35 +54,71 @@ jobs:
4954 - store_artifacts :
5055 path : test-reports.tar.gz
5156
57+ test_esmvaltool_base_installation :
58+ # Test running the example recipe with minimal dependencies.
59+ docker :
60+ - image : cimg/base:current
61+ resource_class : medium
62+ steps :
63+ - checkout
64+ - run :
65+ name : Generate cache key
66+ # Refresh the cache every month.
67+ command : echo $(date '+%Y-%m') | tee cache_key.txt
68+ - restore_cache :
69+ key : test-base-{{ .Branch }}-{{ checksum "cache_key.txt" }}
70+ - pixi/pixi_setup :
71+ env : esmvaltool-base
72+ - run :
73+ name : Check dependencies are compatible
74+ command : pixi run --as-is --environment esmvaltool-base pip check
75+ - run :
76+ name : Run example recipe
77+ command : |
78+ source <(pixi shell-hook --as-is --environment esmvaltool-base)
79+ esmvaltool version
80+ esmvaltool config copy data-intake-esgf.yml
81+ python -c '
82+ import intake_esgf
83+ intake_esgf.conf["solr_indices"]["esgf.ceda.ac.uk"] = True
84+ intake_esgf.conf["solr_indices"]["esgf-data.dkrz.de"] = True
85+ intake_esgf.conf.save()
86+ '
87+ esmvaltool run --max-parallel-tasks=2 testing/recipe_python_for_CI.yml
88+ - store_artifacts :
89+ path : /root/esmvaltool_output
90+ - save_cache :
91+ key : test-base-{{ .Branch }}-{{ checksum "cache_key.txt" }}
92+ paths :
93+ - /root/climate_data
94+
5295 test_upstream_development :
5396 # Test running recipes with the development version of ESMValCore. The
5497 # purpose of this test to discover backward-incompatible changes early on in
5598 # the development cycle.
5699 docker :
57100 - image : cimg/base:current
58- resource_class : large
101+ resource_class : medium
59102 steps :
60103 - checkout
61104 - run :
62105 name : Generate cache key
63- command : echo $(date '+%Y')-$(expr $(date '+%V') / 2) | tee cache_key.txt
106+ # Refresh the cache every month.
107+ command : echo $(date '+%Y-%m') | tee cache_key.txt
64108 - restore_cache :
65109 key : test-upstream-{{ .Branch }}-{{ checksum "cache_key.txt" }}
66110 - pixi/pixi_setup :
67111 env : esmvalcore-dev
68112 - run :
69113 name : Run tests
70114 command : |
71- pixi run --as-is --environment esmvalcore-dev test -n 4 --junitxml=test-reports/report.xml
115+ pixi run --as-is --environment esmvalcore-dev test -n 2 --junitxml=test-reports/report.xml
72116 - store_test_results :
73117 path : test-reports/report.xml
74118 - run :
75119 name : Run recipes
76120 command : |
77121 source <(pixi shell-hook --as-is --environment esmvalcore-dev)
78- # Temporarily install intake-esgf here until there is a new release
79- # that includes https://github.com/esgf2-us/intake-esgf/pull/160.
80- pip install git+https://github.com/esgf2-us/intake-esgf@main
81122 esmvaltool version
82123 esmvaltool config copy data-intake-esgf.yml
83124 python -c '
@@ -100,7 +141,7 @@ jobs:
100141 # Test building documentation
101142 docker :
102143 - image : cimg/base:current
103- resource_class : medium+
144+ resource_class : medium
104145 steps :
105146 - checkout
106147 - pixi/pixi_setup
@@ -148,6 +189,7 @@ workflows:
148189 - main
149190 jobs :
150191 - tests
192+ - test_esmvaltool_base_installation
151193 - test_upstream_development
152194 - build_documentation
153195 - test_installation_from_conda
0 commit comments