@@ -35,36 +35,29 @@ jobs:
3535 run : sudo apt-get -y install libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xinerama0 libxcb-xfixes0 x11-utils
3636
3737 - name : Setup Conda
38- uses : conda-incubator/setup-miniconda@v2
39- with :
40- python-version : ${{ matrix.python-version }}
41- activate-environment : test-env
42- environment-file : .github/conda-env/test-env.yml
43- miniforge-version : latest
44- miniforge-variant : Mambaforge
45- channels : conda-forge
46- channel-priority : strict
47- auto-update-conda : false
48- auto-activate-base : false
49-
50- - name : Install optional dependencies
51- shell : bash -l {0}
5238 run : |
53- if [[ '${{matrix.slycot}}' == 'conda' ]]; then
54- mamba install slycot
55- fi
56- if [[ '${{matrix.pandas}}' == 'conda' ]]; then
57- mamba install pandas
58- fi
59- if [[ '${{matrix.cvxopt}}' == 'conda' ]]; then
60- mamba install cvxopt
61- fi
62-
39+ echo $CONDA/bin >> $GITHUB_PATH
40+ conda create -q -c conda-forge --strict-channel-priority -n test-environment \
41+ python=${{matrix.python-version}} \
42+ coverage \
43+ coveralls \
44+ pytest \
45+ pytest-cov \
46+ pytest-timeout \
47+ numpy \
48+ matplotlib \
49+ scipy \
50+ ${{ matrix.slycot == 'conda' && 'slycot' || '' }} \
51+ ${{ matrix.pandas == 'conda' && 'pandas' || '' }} \
52+ ${{ matrix.cvxopt == 'conda' && 'cvxopt' || '' }}
53+
6354 - name : Test with pytest
64- shell : bash -l {0}
6555 env :
6656 PYTHON_CONTROL_ARRAY_AND_MATRIX : ${{ matrix.array-and-matrix }}
67- run : xvfb-run pytest --cov=control --cov-config=.coveragerc control/tests
57+ run : |
58+ source $CONDA/bin/activate test-environment
59+ conda list
60+ xvfb-run pytest --cov=control --cov-config=.coveragerc control/tests
6861
6962 - name : Coveralls parallel
7063 # https://github.com/coverallsapp/github-action
0 commit comments