Skip to content

typos README.rst

typos README.rst #506

Workflow file for this run

name: Test
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
pylint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
# we're not yet using 3.12 because there are some issues
# with pylint there (November 2023)
python-version: '3.11'
- name: Pylint
run: |
python -m pip install pylint
python -m pip install . # to install dependencies
pylint cvxportfolio
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
# rationale: we test against an environment with current packages as of:
# ~ Q4 2023 for python 3.11
# ~ Q4 2022 for python 3.10
# ~ Q4 2021 for python 3.9
# for Python 3.8 it is more problematic with more incompatibilities, it
# is nearing its EOL so we simply test against an old Pandas
# we only install the base packages here,
# then pip below figures out the others
- name: If running on python 3.8 install some old dependencies
if: ${{ matrix.python-version == '3.8'}}
run: python -m pip install pandas==1.4.0
- name: If running on python 3.9 install some old dependencies
if: ${{ matrix.python-version == '3.9'}}
run: python -m pip install numpy==1.21.5 scipy==1.7.3 cvxpy==1.1.17 pandas==1.4.0 osqp==0.6.2.post0 ecos==2.0.11 scs==2.1.4
- name: If running on python 3.10 install some old dependencies
if: ${{ matrix.python-version == '3.10'}}
run: python -m pip install numpy==1.23.4 scipy==1.9.3 cvxpy==1.2.3 pandas==1.5.0 osqp==0.6.2.post9 ecos==2.0.12 scs==3.2.2
- name: If running on python 3.11 install some old dependencies
if: ${{ matrix.python-version == '3.11'}}
run: python -m pip install numpy==1.26.1 scipy==1.11.3 cvxpy==1.4.1 pandas==2.1.2 osqp==0.6.3 ecos==2.0.12 scs==3.2.3
- name: Install package
run: |
python -m pip install .
python -m pip install coverage[toml] # extra only needed on py < 3.11
- name: Run tests with coverage
run: |
coverage run -m cvxportfolio.tests
coverage lcov
- name: Coveralls GitHub Action
uses: coverallsapp/github-action@v1
with:
path-to-lcov: coverage.lcov