Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Merged
murrayrm merged 10 commits intopython-control:masterfrommurrayrm:github-actions-conda
Jan 12, 2021
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions.coveragerc
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
[run]
source = control
omit = control/tests/*
relative_files = True

[report]
exclude_lines =
Expand Down
39 changes: 39 additions & 0 deletions.github/workflows/control-slycot-src.yml
View file
Open in desktop
Original file line numberDiff line numberDiff 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
67 changes: 67 additions & 0 deletions.github/workflows/python-package-conda.yml
View file
Open in desktop
Original file line numberDiff line numberDiff 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
Copy link
Contributor

Choose a reason for hiding this comment

The 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
Copy link
Contributor

Choose a reason for hiding this comment

The 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

[8]ページ先頭

©2009-2025 Movatter.jp