@@ -17,41 +17,82 @@ jobs:
17
17
build :
18
18
name : Build (${{ matrix.python-version }}, ${{ matrix.os }})
19
19
runs-on : ${{ matrix.os }}
20
+ defaults :
21
+ run :
22
+ shell : bash -l {0}
20
23
strategy :
21
24
fail-fast : false
22
25
matrix :
23
26
os : ["ubuntu-latest"]
24
- python-version : ["3.8", "3.9", "3. 10"]
27
+ python-version : ["3.8", "3.10"]
25
28
steps :
26
29
- uses : actions/checkout@v3
27
30
with :
28
- # need to fetch all tags to get a correct version
29
- fetch-depth : 0 # fetch all branches and tags
30
- - uses : conda-incubator/setup-miniconda@v2
31
- with :
32
- channels : conda-forge
33
- mamba-version : " *"
34
- activate-environment : cf_xarray_test
35
- auto-update-conda : false
36
- python-version : ${{ matrix.python-version }}
31
+ fetch-depth : 0 # Fetch all history for all branches and tags.
32
+ - name : Set environment variables
33
+ run : |
34
+ echo "PYTHON_VERSION=${{ matrix.python-version }}" >> $GITHUB_ENV
37
35
- name : Set up conda environment
38
- shell : bash -l {0}
36
+ uses : mamba-org/provision-with-micromamba@v14
37
+ with :
38
+ environment-file : ci/environment.yml
39
+ environment-name : cf_xarray_test
40
+ cache-env : true
41
+ extra-specs : |
42
+ python="${{ matrix.python-version }}"
43
+ - name : Install cf_xarray
39
44
run : |
40
- mamba env update -f ci/environment.yml
41
- python -m pip install -e .
42
- conda list
43
-
45
+ python -m pip install --no-deps -e .
44
46
- name : Run Tests
45
- shell : bash -l {0}
46
47
run : |
47
- pytest --cov=./ --cov-report=xml
48
+ pytest -n auto --cov=./ --cov-report=xml
49
+ - name : Upload code coverage to Codecov
50
+
51
+ with :
52
+ file : ./coverage.xml
53
+ flags : unittests
54
+ env_vars : RUNNER_OS,PYTHON_VERSION
55
+ name : codecov-umbrella
56
+ fail_ci_if_error : false
48
57
58
+ old-xarray :
59
+ name : xarray 2022.03.0
60
+ runs-on : " ubuntu-latest"
61
+ defaults :
62
+ run :
63
+ shell : bash -l {0}
64
+ strategy :
65
+ fail-fast : false
66
+ matrix :
67
+ python-version : ["3.10"]
68
+ steps :
69
+ - uses : actions/checkout@v3
70
+ with :
71
+ fetch-depth : 0 # Fetch all history for all branches and tags.
72
+ - name : Set environment variables
73
+ run : |
74
+ echo "PYTHON_VERSION=${{ matrix.python-version }}" >> $GITHUB_ENV
75
+ - name : Set up conda environment
76
+ uses : mamba-org/provision-with-micromamba@v14
77
+ with :
78
+ environment-file : ci/environment.yml
79
+ environment-name : cf_xarray_test
80
+ cache-env : true
81
+ extra-specs : |
82
+ python="${{ matrix.python-version }}"
83
+ xarray="2022.03.0"
84
+ - name : Install cf_xarray
85
+ run : |
86
+ python -m pip install --no-deps -e .
87
+ - name : Run Tests
88
+ run : |
89
+ pytest -n auto --cov=./ --cov-report=xml
49
90
- name : Upload code coverage to Codecov
50
- uses : codecov/codecov-action@v3
91
+ uses : codecov/codecov-action@v3.1.1
51
92
with :
52
93
file : ./coverage.xml
53
94
flags : unittests
54
- env_vars : OS,PYTHON
95
+ env_vars : RUNNER_OS,PYTHON_VERSION
55
96
name : codecov-umbrella
56
97
fail_ci_if_error : false
57
98
61
102
steps :
62
103
- uses : actions/checkout@v3
63
104
with :
64
- # need to fetch all tags to get a correct version
65
- fetch-depth : 0 # fetch all branches and tags
105
+ # need to fetch all tags to get a correct version
106
+ fetch-depth : 0 # fetch all branches and tags
66
107
- uses : conda-incubator/setup-miniconda@v2
67
108
with :
68
109
channels : conda-forge
0 commit comments