MAINT: Update nbqa hook and github workflow #399
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: NetworkX Notebooks | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
max-parallel: 12 | |
matrix: | |
os: [Ubuntu-22.04, macOS-latest] | |
python-version: ["3.9", "3.10", "3.11"] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Before install | |
run: | | |
if [ "$RUNNER_OS" == "Linux" ]; then | |
sudo apt-get update | |
sudo apt-get install graphviz graphviz-dev | |
elif [ "$RUNNER_OS" == "macOS" ]; then | |
brew install graphviz pkg-config | |
fi | |
python3 -m venv ~/venv | |
source ~/venv/bin/activate | |
- name: Install dependencies | |
run: | | |
pip install -U pip | |
pip install -r requirements.txt | |
- name: Lint with precommit | |
run: | | |
pip install pre-commit | |
pre-commit run --all-files --show-diff-on-failure --color always | |
- name: Test with nbval | |
run: | | |
pip install pytest | |
pytest --nbval-lax --durations=25 content/ |