Merge pull request #112 from gboeing/dependabot/github_actions/action… #202
This file contains hidden or 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: CI | |
| permissions: | |
| contents: read | |
| on: # yamllint disable-line rule:truthy | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| workflow_dispatch: | |
| jobs: | |
| CI: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 60 | |
| strategy: | |
| fail-fast: false | |
| defaults: | |
| run: | |
| shell: bash -elo pipefail {0} | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v5 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v6 | |
| with: | |
| cache-dependency-glob: pyproject.toml | |
| enable-cache: true | |
| - name: Install dependencies | |
| run: uv sync --all-extras --all-groups | |
| - name: Cache pre-commit | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cache/pre-commit/ | |
| key: pre-commit-${{ hashFiles('.pre-commit-config.yaml') }} | |
| - name: Run pre-commit checks | |
| run: uv run pre-commit run --all-files | |
| env: | |
| SKIP: no-commit-to-branch | |
| - name: Test notebooks | |
| run: | | |
| cd ./notebooks | |
| uv run python -c "import osmnx; print(osmnx.__version__)" | |
| uv run jupyter nbconvert --to python *.ipynb | |
| for filename in *.py; do uv run ipython "$filename"; done |