Skip to content

Use env.yml in CI and build docs, fixes #155. #82

Use env.yml in CI and build docs, fixes #155.

Use env.yml in CI and build docs, fixes #155. #82

Workflow file for this run

name: Build and Test
on: [push, pull_request]
# cancels prior builds for this workflow when new commit is pushed
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
name: Build and run tests
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
defaults:
run:
shell: bash -el {0}
steps:
- name: Checkout Opty
uses: actions/checkout@v4
- name: Setup Conda environment
uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
python-version: ${{ matrix.python-version }}
channels: conda-forge
- name: Install basic dependencies
run: |
conda install -q -y sympy cython scipy cyipopt pytest pytest-cov coverage matplotlib-base openmp
- name: Test with pytest
run: |
conda list
pytest --cov=opty opty/
- name: Install Opty and test import
run: |
python -m pip install .
conda list
python -c "import opty"
- name: Run an example
run: |
python examples/vyasarayani2011.py
- name: Run an openmp example
run: |
conda install pydy
python examples/parallel_example.py