1- name : Python Package using Conda
1+ name : CI
22
3- on : [push, pull_request]
3+ on :
4+ push :
5+ branches : [master, main]
6+ pull_request :
7+
8+ concurrency :
9+ group : ${{ github.workflow }}-${{ github.ref }}
10+ cancel-in-progress : true
411
512jobs :
613 build :
916 fail-fast : false
1017 matrix :
1118 os : [ubuntu-latest, macos-latest, windows-latest]
12- python-version : ["3.12", "3.13"]
19+ python-version : ["3.11", "3. 12", "3.13"]
1320
1421 steps :
1522 - uses : actions/checkout@v4
1623
17- # 1) Install Conda (Miniforge) + activate an env
1824 - name : Set up Conda (Miniforge) + Python ${{ matrix.python-version }}
1925 uses : conda-incubator/setup-miniconda@v3
2026 with :
@@ -26,35 +32,29 @@ jobs:
2632 channels : conda-forge,defaults
2733 channel-priority : strict
2834
29- # Important: ensures "conda activate ci" applies to all run steps
3035 - name : Show conda info
3136 shell : bash -l {0}
3237 run : |
3338 conda info
3439 python --version
35- which python || where python
3640
37- # 2) Install uv (so "uv pip ..." works)
3841 - name : Set up uv
3942 uses : astral-sh/setup-uv@v3
4043
41- # 3) Install dependencies
4244 - name : Install dependencies
4345 shell : bash -l {0}
4446 run : |
45- conda install -y -c conda-forge glpk cartopy
47+ conda install -y -c conda-forge flake8 pytest
4648 uv pip install --system -r requirements.lock
49+ uv pip install --system highspy
4750 pip install -e .
48- pip install highspy
4951
50- - name : Lint with flake8
52+ - name : Lint with flake8 (syntax errors only)
5153 shell : bash -l {0}
5254 run : |
53- conda install -y flake8
5455 flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
55- flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
56+
5657 - name : Test with pytest
5758 shell : bash -l {0}
5859 run : |
59- conda install -y pytest
60- pytest -vv tests/test_run.py
60+ pytest -vv tests/
0 commit comments