fix tests, update installation instructions, add case study #13
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
--- | |
# configuration for GitHub Actions | |
name: MacOS Build with PDM | |
on: | |
push: | |
pull_request: | |
jobs: | |
build: | |
name: Testing Build (${{ matrix.python-version }}, ${{ matrix.os }}) | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: ["macos-latest"] | |
python-version: [ | |
'3.10', | |
'3.11', | |
'3.12' | |
] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: pdm-project/setup-pdm@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: true | |
- name: Install graphviz | |
run: | | |
brew install graphviz | |
- name: Install Python dependencies | |
run: | | |
export CFLAGS="-I $(brew --prefix graphviz)/include" | |
export LDFLAGS="-L $(brew --prefix graphviz)/lib" | |
pdm install -v | |
- 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') }} | |
- 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 dependencies for testing | |
run: | | |
pdm install -G tests | |
- name: Run tests | |
run: | | |
pdm run pytest -v tests |