Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 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
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 =
Expand Down
25 changes: 22 additions & 3 deletions .github/workflows/python-package-conda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Conda-based pytest
on: [push, pull_request]

jobs:
build-linux:
test-linux:
runs-on: ubuntu-latest

strategy:
Expand All @@ -19,6 +19,7 @@ jobs:

steps:
- uses: actions/checkout@v2

- name: Install dependencies
run: |
# Set up conda
Expand All @@ -31,18 +32,36 @@ jobs:

# Install test tools
conda install pip coverage pytest
conda install -c conda-forge pytest-cov
pip install coveralls

Copy link
Copy Markdown
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
Copy Markdown
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. See python-control/Slycot#140. Use the --cov parameter.

# See https://github.com/python-control/python-control/pull/504
xvfb-run --auto-servernum pytest control/tests
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