Merge pull request #855 from bnavigator/fix-gha-examples · python-control/python-control@e6ba790
@@ -7,26 +7,27 @@ jobs:
77runs-on: ubuntu-latest
8899steps:
10- - uses: actions/checkout@v3
10+ - name: Check out the python-control sources
11+uses: actions/checkout@v3
12+ - name: Set up conda using the preinstalled GHA Miniconda
13+run: echo $CONDA/bin >> $GITHUB_PATH
1114 - name: Install Python dependencies from conda-forge
1215run: |
13- # Set up conda using the preinstalled GHA Miniconda environment
14- echo $CONDA/bin >> $GITHUB_PATH
15- conda config --add channels conda-forge
16- conda config --set channel_priority strict
17-18- # Install build tools
19- conda install pip setuptools setuptools-scm
20-21- # Install python-control dependencies and extras
22- conda install numpy matplotlib scipy
23- conda install slycot pmw jupyter
16+ conda create \
17+ --name control-examples-env \
18+ --channel conda-forge \
19+ --strict-channel-priority \
20+ --quiet --yes \
21+ pip setuptools setuptools-scm \
22+ numpy matplotlib scipy \
23+ slycot pmw jupyter
24242525 - name: Install from source
26-run: pip install .
26+run: |
27+ conda run -n control-examples-env pip install .
27282829 - name: Run examples
2930run: |
3031 cd examples
31- ./run_examples.sh
32- ./run_notebooks.sh
32+ conda run -n control-examples-env ./run_examples.sh
33+ conda run -n control-examples-env ./run_notebooks.sh