Skip to content

Skip compatability tests on windows-latest #1

Skip compatability tests on windows-latest

Skip compatability tests on windows-latest #1

Workflow file for this run

name: Pre Test
on: [push, pull_request]
jobs:
pretest:
name: Functional Tests
runs-on: ubuntu-latest
if: ${{ github.ref != 'refs/heads/misc' }}
steps:
- uses: actions/checkout@v4
- uses: conda-incubator/setup-miniconda@v3
with:
python-version: 3.11
mamba-version: "*"
miniforge-version: "latest"
channels: conda-forge,defaults
channel-priority: true
activate-environment: anaconda-client-env
- shell: bash -el {0}
name: Install dependencies
run: |
mamba install -y nbmake pytest-xdist line_profiler # add'l packages for notebook tests.
mamba install --file requirements.txt --file requirements-extra.txt
python -m pip install -e .
- shell: bash -el {0}
name: Try installing optional packages
run: |
# Try installing one of the optional packages
pip install gurobipy || pip install coptpy || pip install xpress || pip install cplex || echo "All optional packages failed to install. Skipping."
- shell: bash -el {0}
name: Run pip check
run: |
if ! pip check; then
echo "pip check failed, but the job will continue."
fi
- shell: bash -el {0}
name: Test with pytest
run: |
pytest
- shell: bash -el {0}
name: Test notebooks.
run: |
pytest --nbmake examples --ignore=examples/verification