forked from python-control/python-control
-
Notifications
You must be signed in to change notification settings - Fork 1
89 lines (78 loc) · 2.45 KB
/
python-package-conda.yml
File metadata and controls
89 lines (78 loc) · 2.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
name: Conda-based pytest
on: [push, pull_request]
jobs:
test-linux-conda:
name: >
Py${{ matrix.python-version }};
${{ matrix.slycot || 'no' }} Slycot;
${{ matrix.pandas || 'no' }} Pandas;
${{ matrix.cvxopt || 'no' }} CVXOPT
${{ matrix.mplbackend && format('; {0}', matrix.mplbackend) }}
runs-on: ubuntu-latest
strategy:
max-parallel: 5
fail-fast: false
matrix:
python-version: ['3.10', '3.12']
slycot: ["", "conda"]
pandas: [""]
cvxopt: ["", "conda"]
mplbackend: [""]
include:
- python-version: '3.12'
slycot: conda
pandas: conda
cvxopt: conda
mplbackend: QtAgg
steps:
- uses: actions/checkout@v3
- name: Setup Conda
uses: conda-incubator/setup-miniconda@v3
with:
python-version: ${{ matrix.python-version }}
activate-environment: test-env
environment-file: .github/conda-env/test-env.yml
miniforge-version: latest
channels: conda-forge,defaults
channel-priority: strict
auto-update-conda: false
auto-activate-base: false
- name: Install optional dependencies
shell: bash -l {0}
run: |
if [[ '${{matrix.cvxopt}}' == 'conda' ]]; then
mamba install cvxopt
fi
if [[ '${{matrix.slycot}}' == 'conda' ]]; then
mamba install slycot
fi
if [[ '${{matrix.pandas}}' == 'conda' ]]; then
mamba install pandas
fi
if [[ '${{matrix.mplbackend}}' == 'QtAgg' ]]; then
mamba install pyqt
fi
- name: Test with pytest
shell: bash -l {0}
env:
MPLBACKEND: ${{ matrix.mplbackend }}
run: |
pytest -v --cov=control --cov-config=.coveragerc control/tests
coverage xml
- name: report coverage
uses: coverallsapp/github-action@v2
with:
flag-name: conda-pytest_py${{ matrix.python-version }}_${{ matrix.slycot || 'no' }}-Slycot_${{ matrix.pandas || 'no' }}-Pandas_${{ matrix.cvxopt || 'no' }}_CVXOPT-${{ matrix.mplbackend && format('; {0}', matrix.mplbackend) }}
parallel: true
file: coverage.xml
coveralls-final:
name: Finalize parallel coveralls
if: always()
needs:
- test-linux-conda
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@v2
with:
parallel-finished: true