9
9
10
10
jobs :
11
11
test-job :
12
- runs-on : ubuntu-latest
12
+ runs-on : ${{ matrix.os }}
13
13
14
14
defaults :
15
15
run :
16
16
shell : bash -l {0}
17
17
18
18
strategy :
19
19
matrix :
20
+ os : [ubuntu-latest]
20
21
python-version : ["3.10", "3.11", "3.12"]
22
+ include :
23
+ - os : windows-latest
24
+ python-version : " 3.12"
25
+ - os : macos-13
26
+ python-version : " 3.12"
27
+
21
28
steps :
22
29
- uses : actions/checkout@v4
23
30
32
39
miniforge-version : latest
33
40
use-mamba : true
34
41
activate-environment : cadet-python
35
- channels : conda-forge,
42
+ channels : conda-forge
36
43
37
44
- name : Cache conda
38
45
uses : actions/cache@v3
@@ -41,26 +48,29 @@ jobs:
41
48
CACHE_NUMBER : 0
42
49
with :
43
50
path : ${{ env.CONDA }}/envs
44
- key : python_${{ matrix.python-version }}-${{ steps.get-date.outputs.today }}-${{ env.CACHE_NUMBER }}
51
+ key : ${{ matrix.os }}-python_${{ matrix.python-version }}-${{ steps.get-date.outputs.today }}-${{ hashFiles(env.CONDA_FILE) }}-${{ env.CACHE_NUMBER }}
52
+ id : cache
45
53
46
54
- name : Set up python env
47
55
run : |
48
- mamba install python==${{ matrix.python-version }}
49
- pip install .
56
+ conda install python=${{ matrix.python-version }}
57
+ conda run pip install .
58
+
50
59
- name : Install pypa/build
51
60
run : |
52
- python -m pip install build --user
61
+ conda run python -m pip install build --user
53
62
54
63
- name : Build binary wheel and source tarball
55
64
run : |
56
- python -m build --sdist --wheel --outdir dist/ .
65
+ conda run python -m build --sdist --wheel --outdir dist/ .
57
66
58
67
- name : Test Wheel install and import
59
68
run : |
60
- python -c "import cadet; print(cadet.__version__)"
69
+ conda run python -c "import cadet; print(cadet.__version__)"
61
70
cd ..
71
+
62
72
- name : Test with pytest
63
73
run : |
64
- pip install .[testing]
65
- mamba install -c conda-forge cadet>=5.0.3
74
+ conda run pip install .[testing]
75
+ conda install -c conda-forge cadet>=5.0.3
66
76
pytest tests --rootdir=tests -m "not slow and not local"
0 commit comments