Merge branch 'github-actions-conda_revised' into github-actions-conda · python-control/python-control@40aac67

Original file line numberDiff line numberDiff line change

@@ -3,7 +3,7 @@ name: Conda-based pytest

33

on: [push, pull_request]

44
55

jobs:

6-

build-linux:

6+

test-linux:

77

runs-on: ubuntu-latest

88
99

strategy:

@@ -19,6 +19,7 @@ jobs:

1919
2020

steps:

2121

- uses: actions/checkout@v2

22+
2223

- name: Install dependencies

2324

run: |

2425

# Set up conda

@@ -31,18 +32,36 @@ jobs:

3132
3233

# Install test tools

3334

conda install pip coverage pytest

34-

conda install -c conda-forge pytest-cov

35+

pip install coveralls

3536
3637

# Install python-control dependencies

3738

conda install numpy matplotlib scipy

3839

if [[ '${{matrix.slycot}}' == 'conda' ]]; then

3940

conda install -c conda-forge slycot

4041

fi

42+
4143

- name: Test with pytest

4244

env:

4345

PYTHON_CONTROL_ARRAY_AND_MATRIX: ${{ matrix.array-and-matrix }}

4446

run: |

4547

source $CONDA/bin/activate test-environment

4648

# Use xvfb-run instead of pytest-xvfb to get proper mpl backend

49+

# Use coverage instead of pytest-cov to get .coverage file

4750

# See https://github.com/python-control/python-control/pull/504

48-

xvfb-run --auto-servernum pytest control/tests

51+

xvfb-run --auto-servernum coverage run -m pytest control/tests

52+
53+

- name: Coveralls parallel

54+

# https://github.com/coverallsapp/github-action

55+

uses: AndreMiras/coveralls-python-action@develop

56+

with:

57+

parallel: true

58+
59+

coveralls:

60+

name: coveralls completion

61+

needs: test-linux

62+

runs-on: ubuntu-latest

63+

steps:

64+

- name: Coveralls Finished

65+

uses: AndreMiras/coveralls-python-action@develop

66+

with:

67+

parallel-finished: true