forked from cvxpy/cvxpy
-
Notifications
You must be signed in to change notification settings - Fork 3
34 lines (32 loc) · 1.2 KB
/
test_backends.yml
File metadata and controls
34 lines (32 loc) · 1.2 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
name: test_backends
on:
pull_request:
push:
branches:
- master
tags:
- '*'
jobs:
test_backends:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-python@v6
with:
python-version: "3.12"
- uses: actions/checkout@v5
- name: Install cvxpy dependencies
run: |
pip install -e .
pip install pytest hypothesis
- name: Run tests with SCIPY backend
run : |
export CVXPY_DEFAULT_CANON_BACKEND="SCIPY"
python -c "from cvxpy.cvxcore.python.canonInterface import get_default_canon_backend; print(get_default_canon_backend())"
python -c "from cvxpy.cvxcore.python.canonInterface import get_default_canon_backend; assert get_default_canon_backend() == 'SCIPY'"
pytest
- name: Run tests with COO backend
run : |
export CVXPY_DEFAULT_CANON_BACKEND="COO"
python -c "from cvxpy.cvxcore.python.canonInterface import get_default_canon_backend; print(get_default_canon_backend())"
python -c "from cvxpy.cvxcore.python.canonInterface import get_default_canon_backend; assert get_default_canon_backend() == 'COO'"
pytest