Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

only run python tests when python files change #83

Merged
merged 4 commits into from
Apr 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .github/workflows/javascript-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ on:
push:
branches: [main]
pull_request:
paths:
'**/*'
branches: [main]
jobs:
javascript-ci:
runs-on: ubuntu-latest
Expand Down
22 changes: 21 additions & 1 deletion .github/workflows/python-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@ on:
push:
branches: [main]
pull_request:
paths: "**/*"
branches: [main]

permissions:
contents: read
pull-requests: read

jobs:
python-ci:
runs-on: ubuntu-latest
Expand All @@ -15,6 +20,19 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: dorny/paths-filter@v3
id: changes
with:
filters: |
python:
- 'graphrag/**/*'
- 'poetry.lock'
- 'pyproject.toml'
- '**/*.py'
- '**/*.toml'
- '**/*.ipynb'
- .github/workflows/python-ci.yml

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
Expand Down Expand Up @@ -57,6 +75,7 @@ jobs:
GRAPHRAG_API_KEY: ${{ secrets.OPENAI_API_KEY }}

- name: Smoke Test
if: steps.changes.outputs.python == 'true'
run: |
poetry run poe test_smoke
env:
Expand All @@ -65,5 +84,6 @@ jobs:
GRAPHRAG_EMBEDDING_MODEL: text-embedding-3-small

- name: E2E Test
if: steps.changes.outputs.python == 'true'
run: |
./scripts/e2e-test.sh
Loading