-
Notifications
You must be signed in to change notification settings - Fork 0
84 lines (75 loc) · 2.32 KB
/
python-package-conda.yml
File metadata and controls
84 lines (75 loc) · 2.32 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
name: Conda-based pytest
on: [push, pull_request]
jobs:
test-linux:
name: >
Py${{ matrix.python-version }};
${{ matrix.slycot || 'no' }} Slycot;
${{ matrix.pandas || 'no' }} Pandas;
${{ matrix.cvxopt || 'no' }} CVXOPT
${{ matrix.array-and-matrix == 1 && '; array and matrix' || '' }}
${{ matrix.mplbackend && format('; {0}', matrix.mplbackend) }}
runs-on: ubuntu-latest
strategy:
max-parallel: 5
fail-fast: false
matrix:
python-version: ['3.7', '3.10']
slycot: ["", "conda"]
pandas: [""]
cvxopt: ["", "conda"]
mplbackend: [""]
array-and-matrix: [0]
include:
- python-version: '3.10'
slycot: conda
pandas: conda
cvxopt: conda
mplbackend: QtAgg
array-and-matrix: 1
steps:
- uses: actions/checkout@v3
- name: Setup Conda
uses: conda-incubator/setup-miniconda@v2
with:
python-version: ${{ matrix.python-version }}
activate-environment: test-env
environment-file: .github/conda-env/test-env.yml
miniforge-version: latest
miniforge-variant: Mambaforge
channels: conda-forge
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
- name: Test with pytest
shell: bash -l {0}
env:
PYTHON_CONTROL_ARRAY_AND_MATRIX: ${{ matrix.array-and-matrix }}
MPLBACKEND: ${{ matrix.mplbackend }}
run: pytest -v --cov=control --cov-config=.coveragerc 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