fix tests, update installation instructions, add case study #2
Workflow file for this run
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: MacOS Build with conda | |
on: | |
push: | |
pull_request: | |
jobs: | |
create-env: | |
name: Testing conda env (${{ matrix.python-version }}, ${{ matrix.os }}) | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: ["macos-latest"] | |
python-version: ["3.10","3.11","3.12"] | |
defaults: | |
run: | |
shell: bash -l {0} | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Create environment with conda | |
uses: conda-incubator/setup-miniconda@v3 | |
with: | |
activate-environment: anaconda-client-env | |
python-version: ${{ matrix.python-version }} | |
auto-activate-base: false | |
- name: Install graphviz | |
run: | | |
brew install graphviz | |
pip install --no-cache-dir \ | |
--config-settings="--global-option=build_ext" \ | |
--config-settings="--global-option=-I$(brew --prefix graphviz)/include/" \ | |
--config-settings="--global-option=-L$(brew --prefix graphviz)/lib/" \ | |
--use-pep517 \ | |
pygraphviz | |
- name: Check conda | |
run: | | |
conda info | |
conda list | |
- name: Add pdm | |
run: pip install pdm | |
- name: Install package | |
run: pdm install | |
- name: Try to use cached Spot | |
id: cache-spot | |
uses: actions/cache@v4 | |
with: | |
path: spot-2.12 | |
key: ${{ runner.os }}-${{ matrix.python-version }}-spot-${{ hashFiles('get_spot.py') }}-${{ hashFiles('pyproject.toml') }}-conda | |
- name: Install Spot | |
if: steps.cache-spot.outputs.cache-hit == 'true' | |
run: | | |
cd spot-2.12 | |
make install | |
- name: Build and install Spot | |
if: steps.cache-spot.outputs.cache-hit != 'true' | |
run: | | |
pdm run python get_spot.py | |
- name : Install Package for Testing | |
run : conda install pytest | |
- name : Run tests | |
run : pdm run pytest -v tests |