Fixes, dependency updates, and working transition to GitHub Actions. #12
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: equadratures | |
on: | |
push: | |
branches: | |
- master | |
- develop | |
pull_request: | |
branches: | |
- master | |
- develop | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
jobs: | |
test: | |
# Use older version of ubuntu for Python 3.6. | |
runs-on: ${{ matrix.python-version == '3.6' && 'ubuntu-20.04' || 'ubuntu-latest' }} | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10", "3.11"] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install numpy scipy matplotlib seaborn pip nose2 cvxpy setuptools | |
python -m pip install coveralls numexpr pymanopt | |
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
python setup.py install | |
- name: Install additional dependencies | |
# Install backport of dataclasses for pymanopt dependency on Python < 3.7. | |
if: ${{ matrix.python-version < '3.7' }} | |
run: | | |
python -m pip install dataclasses | |
- name: Test | |
run: | | |
coverage run --source=tests -m nose2 | |
coverage report -m | |
coveralls --service=github |