name: Python Notebook Tests on: push: branches: - "**/main" # match branches like feature/main - "main" # match the main branch pull_request: types: - opened - reopened - synchronize - ready_for_review branches: - "**/main" - "main" paths-ignore: - "**/*.md" - ".semversioner/**" permissions: contents: read pull-requests: read concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} # Only run the for the latest commit cancel-in-progress: true jobs: python-ci: # skip draft PRs if: github.event.pull_request.draft == false strategy: matrix: python-version: ["3.13"] os: [ubuntu-latest, windows-latest] fail-fast: false # Continue running all jobs even if one fails env: DEBUG: 1 GRAPHRAG_API_KEY: ${{ secrets.OPENAI_API_KEY }} GRAPHRAG_API_BASE: ${{ secrets.GRAPHRAG_API_BASE }} runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 - uses: dorny/paths-filter@0e4a8c6effa4802afeda77dc8d303f8176d7dfad # v3.0.4 id: changes with: filters: | python: - 'graphrag/**/*' - 'uv.lock' - 'pyproject.toml' - '**/*.py' - '**/*.toml' - '**/*.ipynb' - '.github/workflows/python*.yml' - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 with: python-version: ${{ matrix.python-version }} - name: Install uv uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6.8.0 - name: Install dependencies shell: bash run: | uv sync --all-packages - name: Notebook Test run: | uv run poe test_notebook