Skip to content

Commit 1e77757

Browse files
Update CI to other OS and use Conda
1 parent 14d4a13 commit 1e77757

File tree

1 file changed

+20
-10
lines changed

1 file changed

+20
-10
lines changed

.github/workflows/pipeline.yml

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,22 @@ on:
99

1010
jobs:
1111
test-job:
12-
runs-on: ubuntu-latest
12+
runs-on: ${{ matrix.os }}
1313

1414
defaults:
1515
run:
1616
shell: bash -l {0}
1717

1818
strategy:
1919
matrix:
20+
os: [ubuntu-latest]
2021
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+
2128
steps:
2229
- uses: actions/checkout@v4
2330

@@ -32,7 +39,7 @@ jobs:
3239
miniforge-version: latest
3340
use-mamba: true
3441
activate-environment: cadet-python
35-
channels: conda-forge,
42+
channels: conda-forge
3643

3744
- name: Cache conda
3845
uses: actions/cache@v3
@@ -41,26 +48,29 @@ jobs:
4148
CACHE_NUMBER: 0
4249
with:
4350
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
4553

4654
- name: Set up python env
4755
run: |
48-
mamba install python==${{ matrix.python-version }}
49-
pip install .
56+
conda install python=${{ matrix.python-version }}
57+
conda run pip install .
58+
5059
- name: Install pypa/build
5160
run: |
52-
python -m pip install build --user
61+
conda run python -m pip install build --user
5362
5463
- name: Build binary wheel and source tarball
5564
run: |
56-
python -m build --sdist --wheel --outdir dist/ .
65+
conda run python -m build --sdist --wheel --outdir dist/ .
5766
5867
- name: Test Wheel install and import
5968
run: |
60-
python -c "import cadet; print(cadet.__version__)"
69+
conda run python -c "import cadet; print(cadet.__version__)"
6170
cd ..
71+
6272
- name: Test with pytest
6373
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
6676
pytest tests --rootdir=tests -m "not slow and not local"

0 commit comments

Comments
 (0)