@@ -24,32 +24,24 @@ jobs:
24
24
python-version : ["3.9", "3.10"]
25
25
steps :
26
26
- uses : actions/checkout@v3
27
- - name : Cache conda
28
- uses : actions/cache@v3
29
- env :
30
- # Increase this value to reset cache if ci/environment.yml has not changed
31
- CACHE_NUMBER : 0
27
+ - name : Create conda environment
28
+ uses : mamba-org/provision-with-micromamba@main
32
29
with :
33
- path : ~/conda_pkgs_dir
34
- key : ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{ hashFiles('ci/environment.yml') }}
35
- - uses : conda-incubator/setup-miniconda@v2
36
- with :
37
- mamba-version : " *"
38
- channels : conda-forge, defaults
39
- activate-environment : test_env_xarrayutils # Defined in ci/environment*.yml
40
- auto-update-conda : false
41
- python-version : ${{ matrix.python-version }}
30
+ cache-downloads : true
31
+ cache-env : true
32
+ micromamba-version : ' latest'
42
33
environment-file : ci/environment.yml
43
- use-only-tar-bz2 : true # IMPORTANT: This needs to be set for caching to work properly!
44
- - name : Set up conda environment
34
+ extra-specs : |
35
+ python=${{ matrix.python-version }}
36
+ - name : Install xarrayutils
45
37
run : |
46
- python -m pip install -e .
38
+ python -m pip install -e . --no-deps
47
39
conda list
48
40
- name : Run Tests
49
41
run : |
50
42
pytest -n auto --cov=./ --cov-report=xml
51
43
- name : Upload code coverage to Codecov
52
-
44
+
53
45
with :
54
46
file : ./coverage.xml
55
47
flags : unittests
@@ -63,25 +55,31 @@ jobs:
63
55
run :
64
56
shell : bash -l {0}
65
57
steps :
66
- - uses : actions/checkout@v3
67
- - name : Cache conda
68
- uses : actions/cache@v3
69
- env :
70
- # Increase this value to reset cache if ci/environment-upstream-dev.yml has not changed
71
- CACHE_NUMBER : 0
72
- with :
73
- path : ~/conda_pkgs_dir
74
- key : ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{ hashFiles('ci/environment-upstream-dev.yml') }}
75
- - uses : conda-incubator/setup-miniconda@v2
76
- with :
77
- activate-environment : test_env_xarrayutils # Defined in ci/environment-upstream-dev.yml
78
- auto-update-conda : false
79
- environment-file : ci/environment-upstream-dev.yml
80
- use-only-tar-bz2 : true # IMPORTANT: This needs to be set for caching to work properly!
81
- - name : Set up conda environment
82
- run : |
83
- python -m pip install -e .
84
- conda list
85
- - name : Run Tests
86
- run : |
87
- pytest -n auto
58
+ - uses : actions/checkout@v3
59
+ - name : Create conda environment
60
+ uses : mamba-org/provision-with-micromamba@main
61
+ with :
62
+ cache-downloads : true
63
+ cache-env : true
64
+ micromamba-version : ' latest'
65
+ environment-file : ci/environment-upstream-dev.yml
66
+ extra-specs : |
67
+ python=3.10
68
+ - name : Install xarrayutils
69
+ run : |
70
+ python -m pip install -e . --no-deps
71
+ conda list
72
+ - name : Run Tests
73
+ run : |
74
+ pytest -n auto --cov=./ --cov-report=xml
75
+ - name : Upload code coverage to Codecov
76
+
77
+ with :
78
+ file : ./coverage.xml
79
+ flags : unittests
80
+ env_vars : OS,PYTHON
81
+ name : codecov-umbrella
82
+ fail_ci_if_error : false
83
+ - name : Run Tests
84
+ run : |
85
+ pytest -n auto
0 commit comments