- Notifications
You must be signed in to change notification settings - Fork441
CI tests via GitHub actions and conda#504
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Changes fromall commits
3f87c33
21e47a6
d83e67d
627754f
47251c6
6ff2e9b
5bb9de4
36ecea1
b7b696f
40aac67
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
[run] | ||
source = control | ||
omit = control/tests/* | ||
relative_files = True | ||
[report] | ||
exclude_lines = | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: Slycot from source | ||
on: [push, pull_request] | ||
jobs: | ||
build-linux: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
- name: Install Python dependencies | ||
run: | | ||
# Set up conda | ||
echo $CONDA/bin >> $GITHUB_PATH | ||
# Set up (virtual) X11 | ||
sudo apt install -y xvfb | ||
# Install test tools | ||
conda install pip pytest | ||
# Install python-control dependencies | ||
conda install numpy matplotlib scipy | ||
- name: Install slycot from source | ||
run: | | ||
# Install compilers, libraries, and development environment | ||
sudo apt-get -y install gfortran cmake --fix-missing | ||
sudo apt-get -y install libblas-dev liblapack-dev | ||
conda install -c conda-forge scikit-build; | ||
# Compile and install slycot | ||
git clone https://github.com/python-control/Slycot.git slycot | ||
cd slycot; python setup.py build_ext install -DBLA_VENDOR=Generic | ||
- name: Test with pytest | ||
run: xvfb-run --auto-servernum pytest control/tests |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
name: Conda-based pytest | ||
on: [push, pull_request] | ||
jobs: | ||
test-linux: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
max-parallel: 5 | ||
matrix: | ||
python-version: [3.6, 3.9] | ||
slycot: ["", "conda"] | ||
array-and-matrix: [0] | ||
include: | ||
- python-version: 3.9 | ||
slycot: conda | ||
array-and-matrix: 1 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Install dependencies | ||
run: | | ||
# Set up conda | ||
echo $CONDA/bin >> $GITHUB_PATH | ||
conda create -q -n test-environment python=${{matrix.python-version}} | ||
source $CONDA/bin/activate test-environment | ||
# Set up (virtual) X11 | ||
sudo apt install -y xvfb | ||
# Install test tools | ||
conda install pip coverage pytest | ||
pip install coveralls | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. coveralls is on conda-forge nowadays | ||
# Install python-control dependencies | ||
conda install numpy matplotlib scipy | ||
if [[ '${{matrix.slycot}}' == 'conda' ]]; then | ||
conda install -c conda-forge slycot | ||
fi | ||
- name: Test with pytest | ||
env: | ||
PYTHON_CONTROL_ARRAY_AND_MATRIX: ${{ matrix.array-and-matrix }} | ||
run: | | ||
source $CONDA/bin/activate test-environment | ||
# Use xvfb-run instead of pytest-xvfb to get proper mpl backend | ||
# Use coverage instead of pytest-cov to get .coverage file | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. pytest-cov produces one. Seepython-control/Slycot#140. Use the --cov parameter. | ||
# See https://github.com/python-control/python-control/pull/504 | ||
xvfb-run --auto-servernum coverage run -m pytest control/tests | ||
- name: Coveralls parallel | ||
# https://github.com/coverallsapp/github-action | ||
uses: AndreMiras/coveralls-python-action@develop | ||
with: | ||
parallel: true | ||
coveralls: | ||
name: coveralls completion | ||
needs: test-linux | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Coveralls Finished | ||
uses: AndreMiras/coveralls-python-action@develop | ||
with: | ||
parallel-finished: true |